Question:

Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and
Monthly. An appointment has a description (for example, “see the dentist”) 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.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More OOPS Interview Questions

What is conditional Compilation?

3 Answers   emc2, HCL,


what is the drawback of classical methods in oops?

0 Answers  


What are generic functions and generic classes?

5 Answers  


How is data security provided in Object Oriented languages? ?

5 Answers  


Why static functions always uses static variables?

3 Answers  






When not to use object oriented programming?

0 Answers  


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

0 Answers   HCL,


What is the renewal class?

0 Answers   Ebix, IBM,


What is encapsulation and abstraction? How are they implemented in C++?

0 Answers   Agilent, ZS Associates,


Why do we use polymorphism?

0 Answers  


What is a null tree?

0 Answers  


what is different between oops and c++

0 Answers   IIT,


Categories