Question
Create a superclass named Commission. Commission class has the properties employees first name, last name, social security number, gross sales and commission rate. Declare all
Create a superclass named Commission. Commission class has the properties employees first name, last name, social security number, gross sales and commission rate. Declare all data members as private. Create argument constructor for Commission class. Use get or set method as necessary. Create a method earning() which calculate earning of employee. (earning=gross sales* commission rate). ______________________________________________________________ Create a subclass BaseCommission which inherit properties of Commission class. BaseCommission class has a property basic salary. Create argument constructor for BaseCommission class. Use get or set method as necessary. Create a method countSalary() which calculate salary of employee. (salary=basic salary+earning). _________________________________________________________________ Write a Test class program in which Ask user to enter values of employees first name, last name, social security number, gross sales, commission rate and basic salary. Create object of BaseCommission class and use toString() method to print the employees information as per following: Employee first name: Employee last name: Employee SIN number: Employee Gross sales: Employee Commission rate: Employee basic salary: Employee Earning: Employee Salary:
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