OOPS Interview Questions
Questions Answers Views Company eMail

Which language is pure oop?

562

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.

653

Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

715


Post New OOPS Questions

Un-Answered Questions { OOPS }

What are two types of polymorphism?

626


Which is not an object oriented programming language?

554


What is the real life example of polymorphism?

620


How do you achieve runtime polymorphism?

579


What is the important feature of inheritance?

645






What is the purpose of polymorphism?

689


What is difference between abstraction and encapsulation?

607


How to hide the base class functionality in Inheritance?

654


can inline function declare in private part of class?

3672


How can you overcome the diamond problem in inheritance?

781


What is difference between inheritance and polymorphism?

587


What is oops concept with example?

590


Why do we use polymorphism?

590


What is variable example?

605


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!!!)

1649