✓ Kizspy.me
Information of the Employee: ld, name, Income.
The income is formatted by two decimal places.
-extra: double
-level:int
+ Boss()
Boss
Where:
•
Boss() default constructor
+ Boss( id: String, name:String
salary: double, extra: double, level:
int)
+ Getters & Setters
+getIncome(): double
+ toString(): String
•
Boss(id: String, name:String
salary: double, extra: double, level: int)-
parameterized constructor, which sets the value to
the id, name, salary, extra, and level
Getters & Setters: write the setters and getters of
all the fields
getIncome(): double return the income is
calculated according to the following formula:
-if level is 1 then income is 12*salary+extra
-if level is 2 then income is 12* salary*1.2 +extra
-if level is 3 then income is 12*salary*1.5 +extra
toString():String return a string that contains the
information of the Boss: id, name, extra, level,
income. The extra and income are formatted by
two decimal places.
The program output might look something like this:
Zoom
+ 100%
Close