0% found this document useful (0 votes)
12 views

Java Task 2

The document describes a Java training task to model a hospital with wards and rooms for admitting patients based on illness codes and age. Classes are to be created for Hospital, Ward, Room and Patient. A menu is to be provided to admit/discharge patients and display patients and vacant rooms based on options.

Uploaded by

rahla sherin pv
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Java Task 2

The document describes a Java training task to model a hospital with wards and rooms for admitting patients based on illness codes and age. Classes are to be created for Hospital, Ward, Room and Patient. A menu is to be provided to admit/discharge patients and display patients and vacant rooms based on options.

Uploaded by

rahla sherin pv
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Java Training Task-2 (Advanced Association)

Submission Time: 04-08-2023 before 5:30pm

Consider a Hospital, Hospital has 5 Wards, Each Wards having 10 Rooms.


Assume Patients are visiting hospital with illness.
Hospital team will collect data for each patient with [id, name, age, illnessCode]

Note:
1) Based on illnessCode and age, patient is admitted to specific wards.
2) Among 5 wards, 2 wards are allotted to covid patients, 1 ward for pregnant
womens, 1 ward for childrens and 1 ward for others.
3) Patient Age < 18 will be admitted to childrens ward (other than covid).

These are illness codes


CVD = Covid
CHILD = Children
PW = Pregnant Women
OT = Others

Create classes for Hospital, Ward, Room and Patient.


Use getters and setters wherever necessary.
Details of a patient stored in a file using comma separated.
Each patient records are stored in separate lines.

Setup Choice based Menu with the following option and display the output as per the
choice:-

1) Admit Patient
2) Discharge Patient
3) Display all vacant rooms in each wards.
4) Display all admitted patients with name, age and illnessCode.
5) Display patient with illnessCode = CVD
6) Display patient with illnessCode = CHILD
7) Display patient with illnessCode = PW
8) Display patient with illnessCode = OT

Note: After completing the tasks, all programs put it in a folder and zip and send it through
[email protected]

Tuesday, 02 April 2024 Confidential Page 1 of 1

You might also like