c++ program in which: Write three derived classes inheriting functionality of base class person (should have a member function that ask to enter name and age) and with added unique features of student, and employee, and functionality to assign, change and delete records of student and employee. And make one member function for printing address of the objects of classes (base and derived) using this pointer. Create two objects of base class and derived classes each and print the addresses of individual objects. Using calculator, calculate the address space occupied by each object and verify this with address spaces printed by the program.
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:
c++
Write three derived classes inheriting functionality of base class person (should have a member
function that ask to enter name and age) and with added unique features of student, and
employee, and functionality to assign, change and delete records of student and employee.
And make one member function for printing address of the objects of classes (base and
derived) using this pointer.
Create two objects of base class and derived classes each and print the addresses of individual
objects.
Using calculator, calculate the address space occupied by each object and verify this with
address spaces printed by the program.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps