Q1_20250829091139.webp
Jellal87

Q1_20250829091139.webp

  • Media owner Jellal87
  • Ngày thêm
experience: int)
Kizspy. me getters & setters
+ calculateBonus(): double
-projects: int
+ Developer()
Developer
+ Developer(salary: double,
experience: int, projects: int)
+ getters & setters
+ toString(): String
+ getLevel(): String
salary, and experience.
⚫ getters & setters: write the setters and getters all
of the fields.
⚫ calculateBonus(): double
returns the bonus
based on experience years, with bonus = salary*
(experience * 0.05)
Where:
• Developer() - Default constructor, calls the parent class
constructor and sets projects to 0
• Developer(salary: double, experience: int, projects:
int) parameterized constructor, which sets values to
salary, experience, projects.
⚫ getters & setters: write the setters and getters all of the
fields.
⚫ getLevel(): String - returns the level of the developer.
If the number of projects is greater than or equal to 5,
level is "Senior Developer", otherwise level is "Junior
Developer"
⚫ toString(): String return the string format that
contains all the information of the Developer: salary-
experience-projects-level. The salary must be
formatted to two decimal places.
Zoom
+100%
The program output might look something like this
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom