Question
Design a class name BasedPlusCommssionEmployee_Name. The class contains: -A private String data field named employeeName for the employee. -A private String data field named ICNumber
Design a class name BasedPlusCommssionEmployee_Name. The class contains:
-A private String data field named employeeName for the employee.
-A private String data field named ICNumber for the employee.
-A private double data field named grossSales for the gross sales of the employee.
-A private double data field named commissionRate for the commission rate of the employee.
-A private double data field named baseSalary data field named for the base salary of the employee.
-A no-arg constructor that creates a default account;
-A constructor that creates an employee with the specified employee name, IC number, gross sales, commission rate and base salary
-Two accessors and mutators for employeeName and ICNumber.
-An accessor and mutator for commissionRate.
-Two accessors and mutators for grossSales and baseSalary. When user enter negative gross sales or base salary, this negative gross sales or base salary should be changed to default value zero.
-A method named enarings() that returns the earning. The formula for the earning is base salary + gross sales * commission rate.
-A method name toString() that returns a string description for the employee. The string description includes employee name, IC number, gross sales, commission rate, base salary.
output:
First employee information:
Employee: James
IC Number: 123456-12-3456
Gross Sales: 5000.00
Commission Rate: 0.04
Base Salary: 1200.00
Earning: 1400.00
Second employee information:
Employee: John
IC Number: 123456-12-3456
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