Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a java program (intelliJ prefereably) CS210 For this project, you will bui

ID: 3843794 • Letter: W

Question

Write a java program (intelliJ prefereably)
CS210

For this project, you will build a hospital interface, where you can:

- Login
- List patients
- Add patients
- See patient records
- Add/remove records for a patient.

You will be reading data from multiple files:
- employees.txt will be responsible for managing user login. (file will be provided)
- patients.txt will be responsible for managing the list of patients (file will be provided)
- Each patient will have their own file with their records.

Suggested way to tackle this homework:

- Start by downloading all the files.
- View the files to see all the formats.
- Read the employees from employees.txt
     o Create a new employee for each line.
     o Add the employees to the employees ArrayList of the hospital.
- Read the patients from patients.txt
     o Create a new patient for each line.
     o For each patient
      Read their designated records.
     • For each line, create a record and add it to the records ArrayList.
o Add the patient to the patients ArrayList of the hostpital.
- At this point, you have a hospital, with employees, patients.
- Write down the menu, with the appropriate switch / if/else statement.
- List_patients should be straightforward.
- View_records, you’ll need a way to find the patient from the patients array list
- Add_record should be straightforward.
- Remove_record, you’ll need a way to find the patient from the patients array list and then find the record from the records array list.
- Add_patient. You’ll need to add this user to the patients.txt and create a record file for them. Suppose you add Thomas, you will have to create a thomas.txt file to hold their records.
- Finally upon program exit (when the user enters 0), write back the data.
- Start with the patients, iterate over all the patients and write them down to patients.txt
     o For each patient, get the records and write it down to the appropriate file. Anne’s records go in to anne.txt, etc.

The files given are:

patients.txt

Anne

Tim

John

stephane

gary

Thomas

employees.txt

doctor-password- surgeon

alan-anotherpassword- technician

The output should look like this:

Name of the Hospital

What is your username?

(user input= username)

What is your password?

(user input= password)

Successfully logged in

What would you like to do?

Options:

1. list_patients

2. view_records

3. add_record

4. remove_patient

5. add_patient

(user input 1)

Patients:

Anne

Tim

John

Stephane

Gary

- prompts the user the same question and option like before such as What would you like to do?....etc.

(user input= 2)

Name of patient you would like to view?

(user input= Anne)

Records

fever - 05/14/2017 14;43;25

cough - 05/14/2017 15:03:01

- prompts the user the same question and option like before such as What would you like to do?....etc.

(user input= 3)

Name of patient you would like to view?

(user input= Anne)

What disease?

congestion

Successfully added record

- prompts the user the same question and option like before such as What would you like to do?....etc.

(user input= 2)

Name of patient you would like to view?

(user input= Anne)

Records

fever- 05/14/2017 14:43:25

cough- 05/14/2017 15:03:01

congestion - 05/14/2017 15:07:10

Explanation / Answer

Employee Object Class:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote