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
What is inheritance write a program to show use of inheritance?
what is code for call by value and call by reference?
What is the real time example of encapsulation?
write a C++ program for booking using constructor and destructor.
What is the difference between an object and a class?
In c++ there is only virtual destructors, no constructors. Why?
Is data hiding and abstraction same?
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
what is virtual function?
26 Answers Aspire, HP, Infosys, RoboSoft, TCS,
What are the different forms of polymorphism??