PRO192_-_PE03_-_FA_2024_3202.webp
Sơn Tùng1

PRO192_-_PE03_-_FA_2024_3202.webp

you change it (incorrectly), the marking software can not find the execute file (.jar) to mark,thus the exam result will be 0.
• All source code files .java in the projects will be created in the default package of the NetBean
Question 1 (2 marks) Read PE instructions at the bottom of the exam paper.
Do not pay attention to the real meaning of objects, variables, and their values in the questions below.
Write a class Employee (in the default package of the NetBean) with the following information:
2 of 3
Paper No: 1
Employee
- id: int
name: String
salary: double
seniority: int
+Employee ()
+Employee (id: int, name: String, salary:
double, seniority: int)
+setSeniority(int seniority): void
+toString(): String
+updateSalary(): void
Zoom
Where:
Employee () - default constructor
Employee(id: int, name: String, salary:double, seniority: int) parameterized constructor, which sets values to id, name,salary, and seniority
setSeniority(int seniority): void update seniority. If the seniority less than or equal to 0 then set to 1
toString(): String return string of format of the Employee: id, name, salary, seniority. The salary is formatted two decimal places.
updateSalary(): void update salary by the
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE03_-_FA_2024_3202.webp
File size
253.1 KB
Dimensions
1920px x 990px

Share this media

Back
Bên trên Bottom