PRO192_-_REB5_-_FA_2023_1330.webp
lanhong87

PRO192_-_REB5_-_FA_2023_1330.webp

Answer (Choose 1 answer)

Given:
11. public abstract class Shape {
12. int x;
13. int y;
14. public abstract void draw();
15. public void setAnchor(int x, int y) {
16.this.x = x;
17. this.y = y;
18. }
19.}
and a class Circle that extends and fully implements the Shape class.
Which is correct?
A. Shape s = new Shape(); s.setAnchor (10,10); s.draw();
B. Circle c = new Shape(); c.setAnchor (10,10); c.draw();
C. Shape s = new Circle(); s.setAnchor (10,10); s.draw();
D. Circle c = new Circle(); c.Shape.setAnchor (10,10); c.Shape.draw();
(12

Thông tin

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

Image metadata

Filename
PRO192_-_REB5_-_FA_2023_1330.webp
File size
57 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom