Q1_20251109103745.webp
May76

Q1_20251109103745.webp

  • Media owner May76
  • Ngày thêm
Question 3:
3 of 3
Paper No: 3
(3 marks) Write a class Book with the following information:
Book
-author:String
-page:int
Where:


getAuthor():String - return author.
getPage():int-return page.
+Book (
⚫ setAuthor(author:String): void - update author.
+Book (author:String, page:int)

setPage(page:int): void - update page.
+getAuthor():String
+getPage():int
+setAuthor(author:String):void
+setPage(page:int):void
The interface IBook below is already compiled and given in byte author format, thus you can use it
without creating IBook.java file.
import java.util.List;
public interface IBook {
public int fl(List<Book> t);
public void f2(List<Book> t);
public void f3(List<Book> t);
Zoom
- FUO
Write a class MyBook, which implements the interface IBook. The class MyBook implements methods
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom