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

PRO192_-_PE03_-_FA_2024_3202.webp

3 of 4
Paper No: 1
Enter id:1
Enter id:1
Enter name: Tran Anh
Enter name: Tran Anh
Enter salary:2000
Enter salary:2500
Enter seniority:6
Enter seniority: 11
1. Test setSeniority()
1. Test set Seniority()
2. Test updateSalary()
2. Test updateSalary()
Enter TC(1 or 2):2
Enter TC(1 or 2):2
OUTPUT:1, Tran Anh, 3000.00,6
Question 2:
OUTPUT:1, Tran Anh, 5000.00,11
Zoom
(3 marks)Write a class named Staff and a class named Engineer extended from Staff (i.e. Staff is a super class and Engineer is a subclass) with the following information:
Staff
Where:
-id: int
Staff()-default constructor
-salary: int
Staff (id:int, salary:int)-parameterized constructor which sets values to id and
+Staff()
salary
+Staff(id:int,salary:int)
+getld ():int
getId(): int-return id
Close
+ 100%
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
2,872
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
192 KB
Dimensions
1920px x 990px

Share this media

Back
Bên trên Bottom