PRO192_-_PE02_-_SU_2025_4005.webp
T

PRO192_-_PE02_-_SU_2025_4005.webp

1.Test getTitle()
2.Test getAuthor()
3.Test toString()
Enter TC(1/2/3):1
1.Test getTitle()
2.Test getAuthor()
3.Test toString()
Enter TC(1/2/3):2
Enter page count:300
Kizspy.me
Enter page count:200
Enter page count:300
Enter page count:99
1.Test getTitle()
2.Test getAuthor()
3.Test toString()
Enter TC(1/2/3):3
OUTPUT:
OUTPUT:
1.Test getTitle()
2.Test getAuthor()
3.Test toString()
Enter TC(1/2/3):2
OUTPUT:
OUTPUT:
CORE JAVA
N/A
APRESS
100, CORE JAVA, APPRESS, 100
Question 2:
3 of 4
Paper No: 1
Zoom
(3 marks)
Write a class named Employee and a class named Boss extended from Employee (i.e. Employee is a
superclass and Boss is a subclass):
-id: String
-name:String
-salary: double
+ Employee()
Employee
+ Employee(id:String, name:String,
salary: double)
+ Getters & Setters
+100%
Where:

Employee () default constructor
Employee(id:String, name:String, salary: double):
- parameterized constructor, which sets values to
id, name and salary.
• Getters & Setters: write the setters and getters of
all the fields.
Close

Thông tin

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

Share this media

Back
Bên trên Bottom