B)Create a class named 'Member' having the following members: Data members 1 - Name 2 - Age 3 - Phone number 4 - Address 5 - Salary It also has a method named 'printSalary' which prints the salary of...


B)Create a class named 'Member' having the following members:<br>Data members<br>1 - Name<br>2 - Age<br>3 - Phone number<br>4 - Address<br>5 - Salary<br>It also has a method named 'printSalary' which prints the salary of the members.<br>Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager'<br>classes have data members 'specialization' and 'department' respectively. Now, assign name, age,<br>phone number, address and salary to an employee and a manager by making an object of both of these<br>classes and print the same.<br>

Extracted text: B)Create a class named 'Member' having the following members: Data members 1 - Name 2 - Age 3 - Phone number 4 - Address 5 - Salary It also has a method named 'printSalary' which prints the salary of the members. Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Now, assign name, age, phone number, address and salary to an employee and a manager by making an object of both of these classes and print the same.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here