PRO192_-_PE01_-_SU_2025_4004.webp
white_cloud1

PRO192_-_PE01_-_SU_2025_4004.webp

☑Kizspy.me
300
Question 3:
(2 marks) Write a class named Book with the following information:
Book
Where:
-id: int
- title: String
-author: String
+ Book()
+ Book(id: int, title: String, author: String)
+ setters & getters
+ toString():String
Book() - default constructor
Book(id: int, title: String, author: String) - a
parameterized constructor that sets values
for id, title, and author
⚫ setters & getters: write the setters and getters
for the fields. The getTitle() method should
return the title in uppercase.
Override toString(): String - returns a string
format that contains all the information of
Zoom
+100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom