Question: Please use java 3. Create a class named 'Member' having the following members: Data members 1 - Name 2 - Age 3 - Phone number
Please use java
3. 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 'printName', 'printSalary' which prints the name and salary of the members. Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department'. Override both of the methods mentioned in the 'Member' class. Write a method named 'printBonus' (25\% bonus for the object(s) of the 'Employee' class and 50% bonus for the object(s) of the 'Manager' class) inside of the both 'Employee' and 'Manager' classes which will print the bonus. From the main method create an array of objects where you have to create one object of each class. Take the values of all of the data members from the user as input and initialize them by using constructor. Finally call all of the methods by using object(s)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
