Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. package day09.quiz;
  2.  
  3. public class Circle extends Shape {
  4. private int radius;
  5.  
  6. public Circle(int radius) {
  7. super();
  8. this.radius = radius;
  9. }
  10.  
  11. public void setRadius(int radius) {
  12. this.radius = radius;
  13. }
  14.  
  15. public int getRadius() {
  16. return radius;
  17. }
  18.  
  19. @Override
  20. public double calculateArea() {
  21. return radius * radius * Math.PI;
  22. }
  23. }
Add Comment
Please, Sign In to add comment