PRO192_-_PE_-_SP_2024_1494.webp
O

PRO192_-_PE_-_SP_2024_1494.webp

  • Media owner Obanai89
  • Ngày thêm
3 of 3 Paper No: 7
Question 3:
(3 marks) Write a class Wall with the following information:
Wall
Where:
-place:String
getPlace():String - return place.
-area:int
getArea():int-return area.
+Wall (0)
setPlace(place:String): void - update place.
+Wall (place:String, area:int)
+getPlace():String
setArea(area:int): void - update area.
+getArea():int
+setPlace(place:String):void
+setArea(area:int):void
The interface IWall below is already compiled and given in byte code format, thus you can use it without creating IWall.java file.
import java.util.List;
public interface IWall {
public int f1(List<Wall> t);
public void f2(List<Wall>t);
public void f3(List<Wall>t);
}
Write a class MyWall, which implements the interface IWall. The class MyWall implements methods f1,

Close
+ 95%
Zoom
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE_-_SP_2024_1494.webp
File size
167.3 KB
Dimensions
1920px x 990px

Share this media

Back
Bên trên Bottom