What is oops and why we use oops?
What is data binding in oops?
When will a constructor executed?
what is overloading and overriding?
What is for loop and its syntax?
What is polymorphism and types?
What is nutshell in programming language?
1 Answers Satyam, Tech Mahindra,
What is multidimensional array?
What is class and example?
What is the real time example of inheritance?
How is data security provided in Object Oriented languages? ?
#include <iostream> using namespace std; int main() { int a = 3; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][2]; }
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.