Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions