NAD M.

asked • 11/12/20

As a programmer, you have been asked to write a Java application, using OOP concepts, for a Hospital with the following requirements:

As a programmer, you have been asked to write a Java application, using OOP concepts, for a Hospital with the following requirements:

• The Hospital has several employees and each one of them has an ID (int), name (string), address (string), mobile phone number (string), email (string) and salary (double) with suitable data types. • The employees are divided into:

o Administration staff: who have in addition to the previous information their position (string). o Doctor: who have also a rank (string) and specialty (string).

• The Hospital also has a set of patients. Each patient is identified by his ID (int), name (string), address (string), mobile phone number (string), email (string), type (A or B) (char) and a set of hospital services (vector or arraylist). • The Hospital has a set of services to be provided to the patients. Each service is identified by ID (int), name (string) and price (double). The patient who is from type A will have a discount 25% of the service price. Assume that all doctors could provide all possible services.

• Every patient could be treated by one doctor and every doctor could treat zero or more patients • Each patient receives one or more services from the doctor who treats him.

At the end, you will need to create a testing class (e.g. Hospital.java) with a static main() method with the following requirements: • It must have initial fixed collections of working staff (at least 3 administration staffs and 2

doctors)

• The project will start by reading a name. If the name is in the administration staff collection, the

program will continue. If it is not, the program will ask for a name again.

• The program will print a selection screen were the administrative staff can choose the operation

he/she wants to perform. The selection screen will be repeated after each selection until the staff

type the number 9 to exit the program:

1. Add a doctor (by providing all her/his information)

2. Add a service (by providing all its information) 3. Add a patient (by providing all her/his information) including all received services IDs (entered by point 2 above)

4. Print all doctors information 5. Print all patients information

6. Display specific doctor data (by reading doctor ID by the user)

7. Display specific patient data (by reading patient ID by the user)

8. Print a specific patient’s bill (by reading the patient ID by the user and then calculating the

total price for all services provided for this patient (could be more than one service for each

patient) 9. Exit the program

• You need to create, use and print a custom exception called DuplicatePateientIdException that

should be thrown when the admin tries to add a new patient using existing patient ID. The message

of the exception should be read as “Invalid patient ID. This patient ID is already used”

1 Expert Answer

By:

NAD M.

I need to source code for a solution for this project using java oop in NetBeans , please help me I mean the source code like this : import java.util.ArrayList; import java.util.Scanner; //interface to implement toString method interface Print{ public String toString(); } //Main class for employee information class HospitalEmployee{ int ID; String name, address, mobile_phone_number, email; double salary; //parameterized Constructor to initialise values public HospitalEmployee(int ID,String name,String address,String mobile_no,String email,double salary){ this.ID = ID; this.name = name; this.address = address; this.mobile_phone_number = mobile_no; this.email = email; this.salary = salary; } ...
Report

11/13/20

NAD M.

I didn't understand what you mean above in your answer
Report

11/13/20

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.