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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started