Answer Posted / george from psg
static function is constant to all object. In the same way
static variable is constant to all so we use static variable
in static function
Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
What is inheritance write a program to show use of inheritance?
What are the data types in oop?
How does polymorphism work?
Advantage and disadvantage of routing in telecom sector
What is a function in oop?
What is the purpose of polymorphism?
What is a null tree?
can inline function declare in private part of class?
How to call a non virtual function in the derived class by using base class pointer
What does no cap mean?
How many human genes are polymorphic?
What is the difference between static polymorphism and dynamic polymorphism?
Can we override main method?
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.
Describe these concepts: Polymorphism, Inheritance and Abstraction.