In java. In this project, you will develop Mobile surgery software. In this project, you are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In java. 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 (Linked List). 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. please apply all requeirments 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. In java. 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 (Linked List). 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. please apply all requeirments 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.
Expert Answer:
Related Book For
Accounting Information Systems
ISBN: 978-0133428537
13th edition
Authors: Marshall B. Romney, Paul J. Steinbart
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
The following given is the 911 call data. Call 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0642 O HUB0: Time g 1:01 1:05 1:07 1:11 1:16 1:20 1:20 1:21 1:26 1:26 1:28 1:31 1:34 1:35 Call 15 16 17 DARREN342222 18...
-
What state of motion did Aristotle attribute to Earth?
-
Determine each of the following as being either true or false. If it is false, explain it. x - y 2x + 1 = (x + y) = x-y 2x + 1
-
In the spring of 1999, Source Associates, Inc. (Source), and Conrad A. Mamajek, Inc. (CAM), entered into a joint venture to act as a middleman for the sale of polymers manufactured by Mitsui...
-
A trust officer at Pond Island Bank needs to determine what percentage of the banks investible funds to place in each of the following investments. The column labeled Yield represents each...
-
The graph below shows the number of people who consume different numbers of lollipops per year. What is the median number of lollipops consumed? Number of People 3 27 24 21 18 15 12 96 Number of...
-
How can Artistotle's rhetorical concepts help you compose your assignments in this course / your messages to an audience?
-
How did the Falklands War impact the Argentine populace, both psychologically and socio-politically, and what lasting ramifications has it left on the nation's collective consciousness and political...
-
How do advancements in technology, particularly artificial intelligence and automation, reshape the global labor market, and what strategies can be adopted to ensure inclusive economic development?
-
600 kg/min of wastewater effluent from your company's manufacturing facility contains 5 mole percent diethyl ether, which needs to be removed before discharge to the sewer. Your company uses a...
-
How does the proliferation of digital connectivity influence notions of privacy and cybersecurity on a global scale, and what regulatory frameworks are needed to address these challenges while...
-
What kinds of payments does MIT withholding tax apply to and what are the rates of withholding tax? What are the different ways in which superannuation funds may be classified? Explain your answer....
-
Q.4 A rectangular pipe, running parallel to the z-axis (from-o to +o), has three grounded metal sides, at y = 0, y = a, and x = 0. The fourth side, at x = b, is maintained at a specified potential...
-
Three successive resonance frequencies in an organ pipe are 1310, 1834, and 2358 Hz. (a) Is the pipe closed at one end or open at both ends? (b) What is the fundamental frequency? (c) What is the...
-
What motives do people have for hacking? Why has hacking become so popular in recent years? Do you regard it as a crime? Explain your position.
-
How are the similarities and differences between the purchase of services, such as telephone service, and the purchase of raw materials reflected in an REA data model?
-
Often it takes several sales calls to obtain the first order from a new customer. Why then does Figure depict the relationship between the Call on Customer and Take Customer Order events as being1:1?...
-
Which of the following best describes the underlying rationale for a written investment policy statement (IPS)? A. A written IPS communicates a plan for trying to achieve investment success. B. A...
-
Which of the following is least important as a reason for a written investment policy statement (IPS)? A. The IPS may be required by regulation. B. Having a written IPS is part of best practice for a...
-
Which of the following is least likely to be placed in the appendices to an investment policy statement (IPS)? A. Rebalancing Policy. B. Strategic Asset Allocation. C. Statement of Duties and...
Study smarter with the SolutionInn App