Question: Implement a base class Appointment and derived classes Day and Monthly. An appointment has a description (for example, see the dentist) and a date (month,

Implement a base class Appointment and derived classes Day and Monthly. An appointment has a description (for example, see the dentist) and a date (month, day, year). It is recommended that the date be implemented as a class, but this is optional. Write a pure virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For a monthly appointment, only the day and year must match; for a day appointment, all three fields must match. Fill in a vector of Appointment pointers with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. Write a program that tests each function and displays the results of their use

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!