PRO192_-_PE01_-_SP_2025_3490.webp
BichPhuong97

PRO192_-_PE01_-_SP_2025_3490.webp

Kizspy.me
Write a class named Employee and a class named Professor extended from Employee (i.e. Employee is
the super class and Professor is the subclass) with the following information:
-id:int
Employee
-name: String
-standardSalary: double
+Employee()
+Employee(id:int, name:String,
standardSalary:double)
+getId():int
+getName():String
+getStandardSalary ():double
Where:
Employee()-default constructor
• Employee(id:int,name: String, standardSalary:
double) parameterized constructor, which
sets the value to the id, name and
standard Salary of the employee.
⚫
getld (): int-return the id of the employee.
⚫
getName(): String - return the name of the
employee in uppercase.
⚫ getStandardSalary (): double - return the
Zoom
Professor
-department: String
+ 100%
standard salary of the employee.
Where:
• Professor()-default constructor
• Professor(id:int, name: String, standardSalary:
double, department:String)
parameterized
constructor which ente the value to the id
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom