You are on page 1of 3

CS 102 Project )Weight: 15%)

Submission Deadline: August 13, 2022

The project will be done by teams of THREE students. Each team should be leaded by one
person. The individual work will not be accepted.
Instructions:
● Submission on August 13, 2022:
1. Code file: Copy your java code to a Word file. And at the end, show some
screen shots for the output produced. Save the file as a pdf.
2. The final pdf file should be submitted by the team leader ONLY.
● Project presentation on August 14 &15, 2022:
o All the team members should present their work individually by running the
code and explain the implementation.
o Each team should be ready for the Q& A session to answer questions
regarding your implementation.
● Your programs should be error-free and run correctly.
● Copying other solutions is not tolerated, zero grades will be given to the teams who
copied!
● Late submission will not be accepted. The failure to present your work will be
considered “no submission” and graded ZERO.

In this project, you will develop Mobile surgery software. In this project, you are required to
develop the following classes:

1. Interface Nameable
Create an interface Nameable that has four methods setFirstName, getFirstName,
setLastName and getLastName.
2. Class Person
the class Person implements interface Nameable. Ensure all the methods in Nameable
are implemented in Person class. In addition, Class Person has first name, last name,
age and national ID as its attributes. Give your class a full argument constructor that
initializes all attributes. Add the necessary setters and getters, in addition to a
toString() method to print all the person details.
3. Class Date
Class Date that has day, month and year as attributes. Give your class a full constructor
that initializes all attributes. Add the necessary setters and getters in addition to a
toString() method.

4. Class Patient
Derive Patient from the class Person. A Patient record has the insurance coverage
state (use the type of Boolean: True for full or false for partial coverage); and count
to track patient total. This class should implement the Comparable interface, and the
compareTo() method should be overridden to order objects based on the patients
ages. In addition, the record should have the patient first name, last name, age and
national ID (defined in the class person). Give your class a full constructor that
initializes all attributes. Make sure that the person constructor will be invoked in the
patient constructor. Add the necessary setters and getter methods in addition to a
toString() method.
5. Class Doctor
Doctor record has the Doctor’s first name, last name, age and national ID (defined in
the class person), a specialty as a string (for example Neurological, Ophthalmic, Oral
and Maxillofacial, Orthopedic, Pediatric Surgery and so on). Use Comparator interface
to make this class comparable based on two comparators: specialty and national ID.
Give your class a full constructor that initializes all attributes. Make sure that the
person constructor will be invoked in the Doctor constructor. Add the necessary
setters and getter methods in addition to a toString() method.

6. Class Surgery
Surgery class will contain doctor object, a date object as surgery date, surgery name,
room number, surgery duration as string and counter to track surgery total. Give your
class a full constructor that initializes all attributes. Add the necessary setters and
getter methods in addition to a toString() method. This class should implement the
Comparable interface, and the compareTo() method should be overridden to order
objects based on surgery duration.

Main Program for testing


Write a menu-driven program to implement the Application. The menu includes the following:
Hint: use switch Statement to implement this menu.
1. Add a new Doctor.
The program will prompt the user to enter the fields for the new Doctor and will add it
to DocList(Array List), which will be used to store Doctor objects.
2. Display all Doctors using foreach.
3. Add a new Patient.
The program will prompt the user to enter the fields of the new Patient and will add
it to PatientList (LinkedList). Where PatientList will be used to store Patient objects.
4. Display all Patients using iterator
5. Add a new Surgery Object.
Create a priority queue called SurList and add surgery objects to it.
6. Display Surgery data. Don’t forget to check for conflicts in the doctor schedule. If the
same doctor at the same date has two surgeries, raise a message. Then, Assign the
surgery to another doctor.
7. Sort Patients
8. Sort Doctors
9. Sort Surgeries.
10. Store Doctor objects in a file.
Write the contents of the DocList to a file called DoctorInfo.txt.
11. Store Patient objects in a file.
Write the contents of the PatientList to a file called PatientInfo.txt.
12. Exit.
The program should handle special cases and incorrect input and terminate safely.

You might also like