Write program for hotel booking system using C++ Program Requirement: a) Create least one (1) base class. b) Create least two (2) derived classes that inherit from the base class created in 2(a). c) Create least one (1) object for each class and one (1) array of objects for one of the class. d) Create least one (1) default constructor for every classes. f) Apply dynamic memory allocation using keyword new and delete for any object or array of objects. g) Create least one (1) virtual function. h) Write sufficient comments to explain your program. (Note : Only a reasonable level of user input checking is needed. Assume that a user will input text and numbers in good faith. He/she will not purposely enter text into a number field and will not key in non-alphanumeric characters for all text fields
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Write program for hotel booking system using C++
Program Requirement:
a) Create least one (1) base class.
b) Create least two (2) derived classes that inherit from the base class created in 2(a).
c) Create least one (1) object for each class and one (1) array of objects for one of the class.
d) Create least one (1) default constructor for every classes.
f) Apply dynamic memory allocation using keyword new and delete for any object or array of objects.
g) Create least one (1) virtual function.
h) Write sufficient comments to explain your program.
(Note : Only a reasonable level of user input checking is needed. Assume that a user will input text and numbers in good faith. He/she will not purposely enter text into a number field and will not key in non-alphanumeric characters for all text fields.)
Step by step
Solved in 2 steps