Question: Please use C++ Exercise P8.7. Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example,
Please use 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 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 year ppeintnent"'s description: a job Fair ppointnent's starting date! 3/15/2018 ppe intnent's tine: 9:30 other appo intnent yn>Ty ppe intnent"'s deseription: a cup of coffee ppe intnent's tinet nother appe intnent (yn>Ty ppe intnent's deseriptiont effice heurs datel 01/01/0000 002010 ppo intnent's tinei 15120 nother appeintnent (yn7y ppo intnent" descriptiont see the dentist date: 82/15/2018 ppe intnent's tine: 124 nother appo intnent Cyin>7y ppo intnent's description a play ppe intnent"s starting date: 04/1/2018 ppeintnent's tine: 20:00 nother appo intnent Cy 7m nter a datel 83/15/2018 he list of appe intnents that happen en 83/15/2018: 0 a job fair. 9130 a cup of coffee,0815 Fisce hours. 15:20 see the dentist, 12:40 ress any key to cont inue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
