Question: write program in JAVA a - Create a class named 'TeamMembers' with the following members: Data members are as follows: john wick 27 1234567891 12
write program in JAVA
a - Create a class named 'TeamMembers' with the following members: Data members are as follows:
john
wick
27
1234567891
12 brampton
$150
b - It also has a method named 'printSalary', which prints the salary of the team members.
c - 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.
d - 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
