Q 1Implement a superclass Appointment and subclasses/types Onetime, Daily, and Monthly. An appointment has a description (use from the following: general, chiropractic, pediatric, heart, gastro, skin,...

Q 1Implement a superclass Appointment and subclasses/types Onetime, Daily, and Monthly. An appointment has a description (use from the following: general, chiropractic, pediatric, heart, gastro, skin, or osteo), and a date. Write a method occursOn(day, month, year) that checks whether the appointment occurs on the given date. For example, for a monthly appointment, you must check whether the day of the month matches. Whether you define this method in the superclass, or decide to overload the method is entirely up to you. Make your own design choice. Write other methods as needed (look at the User Interface given below and decide what functions you may need).Then fill a list of Appointment objects with a mixture of 5 appointments for each subclass (i.e. ‘hard-code’ these in the program). Note: You are to create objects here, and NOT store this information in the file. Give the user the option to add new appointments. The user must specify the type of the appointment (i.e. Onetime, Daily, and Monthly), the description, and the date.The User Interface should look like the following: A. See all current AppointmentsB.See all current Appointments on a given dateC. Make a new AppointmentD.Cancel an existing AppointmentE. See Appointments according to descriptionF.Reload Appointment data from a FileG.Exit the ProgramPlease Enter Your Choice: _Design the sub-menus per your choice/need. For each of the “See Appointments” options above (i.e. A, B, E), the sub-menu should allow the user to save the data to a file. The user should be able to give the name of the file. Then, in option F above, allow the user to reload the data from a file. Here also, allow the user to specify the name of which file to load. The saving part is straightforward: Make a method save. Save the type, description, and date to a file. The loading part is not so easy. First determine the type of the appointment to be loaded, create an object of that type, and then call a load method to load the data.After each menu/ sub-menu choice is completed, come back to the User Interface, i.e. the only way to exit the program is though Choice G.RequirementsMake all the "best programming practice" decisions, e.g. how to show the output, what prompts to display, how to ask for input etc.You are the developer/engineer, it is YOUR decision ... YOUR job. If the program is not presented nicely, you will lose points.First, all that is being asked should be done. Second, the displays should be intuitive, self-explanatory and nicely put.Do NOT assume that the user knows ANYTHING.Write the program such that any new person that sits in front of the terminal, can start playing with it (i.e., the commands, displays etc. are adequate).Submission and DemoPlease put all your .py files in a folder called PY-FILESPut the Screen Output(s) / screenshots in into a Word document/.pdfZip the Py-Files and the screenshots document and then submit to D2L. IF D2L doesn’t allow .zip file submission, then submit all files individually. Thank you!Name your submission as:Lastname-FirstName_423_Proj-2If required, yQ 1

Implement a superclass Appointment and subclasses/types Onetime, Daily, and Monthly. An appointment has a description (use from the following: general, chiropractic, pediatric, heart, gastro, skin, or osteo), and a date. Write a method occursOn(day, month, year) that checks whether the appointment occurs on the given date. For example, for a monthly appointment, you must check whether the day of the month matches.


Whether you define this method in the superclass, or decide to overload the method is entirely up to you. Make your own design choice. Write other methods as needed (look at the User Interface given below and decide what functions you may need).



Then fill a list of Appointment objects with a mixture of 5 appointments for each subclass (i.e. ‘hard-code’ these in the program).Note: You are to create objects here, and NOT store this information in the file.



Give the user the option to add new appointments. The user must specify the type of the appointment (i.e. Onetime, Daily, and Monthly), the description, and the date.




The User Interface should look like the following:


A.See all current Appointments


B.See all current Appointments on a given date


C.Make a new Appointment


D.Cancel an existing Appointment


E.See Appointments according to description


F.Reload Appointment data from a File


G.Exit the Program



Please Enter Your Choice: _



Design the sub-menus per your choice/need. For each of the “See Appointments” options above (i.e. A, B, E), the sub-menu should allow the user to save the data to a file. The user should be able to give the name of the file.


Then, in option F above, allow the user to reload the data from a file. Here also, allow the user to specify the name of which file to load. The saving part is straightforward: Make a method save. Save the type, description, and date to a file. The loading part is not so easy. First determine the type of the appointment to be loaded, create an object of that type, and then call a load method to load the data.


After each menu/ sub-menu choice is completed, come back to the User Interface, i.e. the only way to exit the program is though Choice G.




Requirements



  • Make all the "best programming practice" decisions, e.g. how to show the output, what prompts to display, how to ask for input etc.

  • You are the developer/engineer, it is YOUR decision ... YOUR job. If the program is not presented nicely, you will lose points.

  • First, all that is being asked should be done. Second, the displays should be intuitive, self-explanatory and nicely put.


    Do NOT assume that the user knows ANYTHING.

  • Write the program such that any new person that sits in front of the terminal, can start playing with it (i.e., the commands, displays etc. are adequate).





Submission and Demo



  • Please put all your .py files in a folder called PY-FILES

  • Put the Screen Output(s) / screenshots in into a Word document/.pdf

  • Zip the Py-Files and the screenshots document and then submit to D2L.

  • IF D2L doesn’t allow .zip file submission, then submit all files individually. Thank you!

  • Name your submission as:Lastname-FirstName_423_Proj-2

  • If required, you may be asked to demo the project files IN-Person.

ou ma
Dec 08, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here