Question
Create an abstract Employee superclass, have several subclasses extending it, use encapsulation and make fields private, use constructors, overriding, overloading to print out payment list.
Create an abstract Employee superclass, have several subclasses extending it, use encapsulation and make fields private, use constructors, overriding, overloading to print out payment list.
Employee level:
Level1: part time Level2: sales man Level3: S/W developer Level4: Manager
Payment calculation:
Level1: hours * hourly rate Level2: salary + (sales * incentive) Level3: salary + bonus Level4: salary
Sample input:
// level 1 (kim, 20, 10.5) // (String, int, double)
// level 2 (John, 30000, 5000, 0.02) // (String, int, int, double)
// level 3 (Emily, 40000, 50000) // (String, int, int)
// level 4 (James, 50000) // (String, int)
Sample output:
Name: Kim Age: 25 Gender: Female Payment: $1200.5 Name: John Age: 30 Gender: Male Payment: $35000.0 Name: Emily Age: 22 Gender: Female Payment: $90000.0 Name: James Age: 45 Gender: Male Payment: $50000.0
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