Question: Problem A JAVA Create a class named 'TeamMembers' with the following members: Data members are as follows: FirstName LastName Age PhoneNumber Address Salary It also
Problem A
JAVA
Create a class named 'TeamMembers' with the following members: Data members are as follows:
FirstName
LastName
Age
PhoneNumber
Address
Salary
It also has a method named 'printSalary', which prints the salary of the team members.
Two classes 'Junior_Employee' and 'Senior_Employee' inherit the 'TeamMembers' class. The 'Junior_Employee' and 'Senior_Employee' classes have data members 'project' and 'department', respectively.
Now, assign the first name, last name, age, phone number, address, and salary to an employee and a manager by making an object of both of these classes. Then, print the objects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
