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
-
A simple random sample of size n = 12 is obtained from a population with = 64 and = 19. (a) What must be true regarding the distribution of the population in order to use the normal model to compute...
-
Problem 1 (43 points) The figure below illustrates a proposed mechanism to provide cooling for a nuclear fuel rod. The fuel rod, which has a radius?, and thermal conductivity k,, is surrounded by a...
-
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...
-
Prove: If A is an n x n matrix with complex entries, then det (A)det(A)
-
1. How profitable are the current items in the product line for both Heinz and for retailers? Consider the profitability of both regular and promotional prices on a dollar and percentage basis.
-
Helen Cole, her husband, and her son were partners in a business. Mrs. Cole's husband died, leaving his equity in the partnership to Mrs. Cole. Mrs. Cole and her son plan to form a new partnership...
-
Cost and production data for Biloxi Beverages, Inc., are presented as follows. Required: 1. Calculate net variances for materials, labor, and factory overhead. 2. a. Calculate specific materials and...
-
Bramble Company expects to produce 1,008,000 units of Product XX in 2027. Monthly production is expected to range from 67,200 to 100,800 units. Budgeted variable manufacturing costs per unit are...
-
Use anonymous FTP to connect to ftp.rfc-editor.org (directory innotes), and retrieve the RFC index. Also retrieve the protocol specifications for TCP, IP, and UDP.
-
Which of the following statements about the behaviour of organic compounds after exposure to light as represented in a Jablonski diagram are FALSE? Select one or more: O The slowest process in a...
-
How can leaders cultivate a personal philosophy of ethical leadership, and what strategies can they use to maintain their ethical compass while navigating complex organizational politics and external...
-
Under the current method of production, small heaters pass through several departments, where each department has a collection of similar machines. The first department cuts a metal pipe into one of...
-
A country is experiencing unemployment of 4% and inflation of 10%. The central bank uses contractionary monetary policy to reduce inflation. Explain how this might happen, what policy might be used,...
-
Explain the role of prices in allocating resources in a market economy and how changes in supply and demand affect prices. Provide specific examples of how government policies can influence market...
-
CM5: In the classic video game Donkey Kong, Donkey Kong is an ape who can move by rolling on top of a barrel, as in the figure. If the barrel is a hollow cylinder with a radius of 15 cm, length of 50...
-
Do either of this insurances (hazard or title) pose more value over the other or are the equals?
-
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?...
-
Is flowcharting useful in analyzing the resources required to implement a system?
-
What important feature is common to analytic, document, and forms distribution charts?
-
Symbol A could represent (a) computation of gross pay. (b) input of payroll data. (c) preparation of paychecks. (d) verification of pay rates.
Study smarter with the SolutionInn App