Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in java A patient can have one or more illnesses. An illness has an illness Name and and illness department. a. Define a class called
in java
A patient can have one or more illnesses. An illness has an illness Name and and illness department. a. Define a class called Iliness with appropriate fields and provide the required constructor, accessor (get) and mutator (set) methods. You should also consider the relationship between the Patient and Illness classes. b. Modify the main program developed in Exercise 1c such that, for each Patient who has illnesses, the program prompts the user to enter the illnesse's name and department. c. Modify the main program to give the user the options to do the following: 1. Print details of all patients including the illnesses they have. 2. Print the details of the patients who have illnesses. Each patient on two lines: one for the patient and one for his/her illnesses. 3. Print the names of the patients who have more than 1 illness. 4. Exit the program. Note: Please show all the options in your output screenshot Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started