Question: In python Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An appointment has a description (for example, see the dentist) and a date.
In python
Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An appointment has a description (for example, see the dentist) and a date. Write a method occursOn(year, month, day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Have the user enter a date and print out all appointments that occur on that date. Give the user the option to add new appointments. The user must specify the type of the appointment, the description, and the date. Write the test program. The user can choose whether to add new appointment or to check the appointment occurs on a date. The program ends when the user enter the string quit.
here is how the program is scored:
Is superclass Appointment, subclasses, Onetime, Daily, Monthly properly defined?
(1) is appointments stored in the appropriate data structure? [10]
(2) Have you properly defined the necessary methods of each class? [14]
- methods of superclass and subclass should be optimized without overlapping [7]
- All necessary actions must be defined as methods in the class [7]
(3) are all appointments for the date you entered printed properly? [35]
onetime [10] / daily [10] / monthly [15]
(4) are new appointments added correctly? [16]
3. Have you written the test program properly? [15]
(1) appointment can be added / checked [5]
(2) appointment can be selected onetime, daily, monthly [5]
(3) Select "quit" to quit program [5]
- If input is other than "quit", continue program execution
4. Does the user print the appropriate description? [5]
- The description should be printed so that it is not inconvenient for the user to use the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
