SlideShare a Scribd company logo
Write a java program using BlueJ: a) Create a class "Patient" with data members Pname, Page
and Pid. Declare a method displa which display the details of patient. b) Create a subclass
"Inpatient" which inherits the Patient class and implements interface and declare a method to
display the message "Inheritance Program". c) Create an interface and declare a method to print
your name. d) Create an instance for each class and call the method.

More Related Content

More from EvanadoJamesz

Which of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docxWhich of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docxEvanadoJamesz
 
Which of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docxWhich of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docxEvanadoJamesz
 
Which of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docxWhich of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docxEvanadoJamesz
 
Which of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docxWhich of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docxEvanadoJamesz
 
Which of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docxWhich of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docxEvanadoJamesz
 
Which of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docxWhich of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docxEvanadoJamesz
 
Which one is a block tag- A- epres B- h1- C- E-.docx
Which one is a block tag- A- epres B- h1- C-  E-.docxWhich one is a block tag- A- epres B- h1- C-  E-.docx
Which one is a block tag- A- epres B- h1- C- E-.docxEvanadoJamesz
 
Which one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docxWhich one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docxEvanadoJamesz
 
Write a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docxWrite a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docxEvanadoJamesz
 
Write a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docxWrite a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docxEvanadoJamesz
 
Write a java program using BlueJ- a) Create a class shop that contains.docx
Write a java program using BlueJ- a) Create a class shop that contains.docxWrite a java program using BlueJ- a) Create a class shop that contains.docx
Write a java program using BlueJ- a) Create a class shop that contains.docxEvanadoJamesz
 
Write a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docxWrite a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docxEvanadoJamesz
 
Write a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docxWrite a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docxEvanadoJamesz
 
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docxWrite a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docxEvanadoJamesz
 
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID-  The X c.docxWrite a bash shell named X that takes 2 arguments- F and PID-  The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docxEvanadoJamesz
 
WRITE C++ recursive function PrintPattern2- to print following patter.docx
WRITE  C++ recursive function PrintPattern2- to print following patter.docxWRITE  C++ recursive function PrintPattern2- to print following patter.docx
WRITE C++ recursive function PrintPattern2- to print following patter.docxEvanadoJamesz
 
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docxWhy does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docxEvanadoJamesz
 
Would the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docxWould the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docxEvanadoJamesz
 
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docxWorkplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docxEvanadoJamesz
 
Write code in C++ Define a class called Wallet that represents numbe.docx
Write  code in C++  Define a class called Wallet that represents numbe.docxWrite  code in C++  Define a class called Wallet that represents numbe.docx
Write code in C++ Define a class called Wallet that represents numbe.docxEvanadoJamesz
 

More from EvanadoJamesz (20)

Which of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docxWhich of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docx
 
Which of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docxWhich of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docx
 
Which of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docxWhich of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docx
 
Which of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docxWhich of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docx
 
Which of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docxWhich of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docx
 
Which of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docxWhich of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docx
 
Which one is a block tag- A- epres B- h1- C- E-.docx
Which one is a block tag- A- epres B- h1- C-  E-.docxWhich one is a block tag- A- epres B- h1- C-  E-.docx
Which one is a block tag- A- epres B- h1- C- E-.docx
 
Which one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docxWhich one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docx
 
Write a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docxWrite a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docx
 
Write a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docxWrite a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docx
 
Write a java program using BlueJ- a) Create a class shop that contains.docx
Write a java program using BlueJ- a) Create a class shop that contains.docxWrite a java program using BlueJ- a) Create a class shop that contains.docx
Write a java program using BlueJ- a) Create a class shop that contains.docx
 
Write a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docxWrite a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docx
 
Write a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docxWrite a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docx
 
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docxWrite a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
 
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID-  The X c.docxWrite a bash shell named X that takes 2 arguments- F and PID-  The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
 
WRITE C++ recursive function PrintPattern2- to print following patter.docx
WRITE  C++ recursive function PrintPattern2- to print following patter.docxWRITE  C++ recursive function PrintPattern2- to print following patter.docx
WRITE C++ recursive function PrintPattern2- to print following patter.docx
 
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docxWhy does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
 
Would the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docxWould the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docx
 
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docxWorkplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
 
Write code in C++ Define a class called Wallet that represents numbe.docx
Write  code in C++  Define a class called Wallet that represents numbe.docxWrite  code in C++  Define a class called Wallet that represents numbe.docx
Write code in C++ Define a class called Wallet that represents numbe.docx
 

Recently uploaded

Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Abhinav Gaur Kaptaan
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringDenish Jangid
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resourcesaileywriter
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 

Recently uploaded (20)

Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Write a java program using BlueJ- a) Create a class -Patient- with dat.docx

  • 1. Write a java program using BlueJ: a) Create a class "Patient" with data members Pname, Page and Pid. Declare a method displa which display the details of patient. b) Create a subclass "Inpatient" which inherits the Patient class and implements interface and declare a method to display the message "Inheritance Program". c) Create an interface and declare a method to print your name. d) Create an instance for each class and call the method.