Question: c++ Exercise P8.7. Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, see the

c++c++ Exercise P8.7. Implement a base class Appointment and derived classes Onetime,

Exercise P8.7. Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, "see the den- tist") and a date and time. Write a virtual function occurs_on int year, int month int 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. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. Don't forget about leap years. See the algorithm https://en.wikipedia.org/wiki/Leap yeair. C:Windowsisystem32cmd.exe Enter the list of appointments. Appointment's description: a job fair Appointment's type: Onetime Appointnent's starting date: 03/15/2018 Appointment's time: 9:30 Another appointment ?y Appointment's description: a cup of coffee Appointment's type: Daily Appointnent's starting date: 01/01/0000 Appointment's time: 08:15 Another appointment (y?y Appointment's description: office hours Appointment's type: Weekly Appointment's starting date: 03/01/2018 Appointment's time: 15:20 Another appointment (y?y Appointnent's description: see the dentist Appointment's type Monthly Appointment's starting date: 02/15/2018 Appointment's time: 12:40 Another appointment (y>?y Appointment's description: a play Appointment's type: Onetime Appointnent's starting date: 04/01/2018

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!