☑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