Question: Please help me solve this question. Thank You! [Object-oriented programming] [Java] p/s: using Java Assume that the following array of object had been declared: Patient[
Please help me solve this question. Thank You! [Object-oriented programming] [Java]
![Please help me solve this question. Thank You! [Object-oriented programming] [Java] p/s:](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/6703fd2308105_6586703fd226ed50.jpg)
p/s: using Java
Assume that the following array of object had been declared: Patient[ ] pn = new Patient [50]; Write a Java application class that uses the concept of polymorphism to perform the following tasks: i) Calculate and display the total cost made by every patient for each subclass, Inpatient and Out Patient 5 ) (5 marks) ii) Count the number of patients that warded in the platinum room type, display the respective information about every patient in the platinum room and the total platinum room based on counter. (6 marks) Assume that the following array of object had been declared: Patient[ ] pn = new Patient [50]; Write a Java application class that uses the concept of polymorphism to perform the following tasks: i) Calculate and display the total cost made by every patient for each subclass, Inpatient and Out Patient 5 ) (5 marks) ii) Count the number of patients that warded in the platinum room type, display the respective information about every patient in the platinum room and the total platinum room based on counter. (6 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
