PRO192_-_PE02_-_SU_2025_4005.webp
T

PRO192_-_PE02_-_SU_2025_4005.webp

✓ 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
Chưa có bình luận nào.

Thông tin

Category
PRO192
Thêm bởi
ThuyPhuong86
Ngày thêm
Lượt xem
4,455
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom