Guest User

Untitled

a guest
Dec 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. package formageometrica;
  2.  
  3. import java.awt.*;
  4.  
  5. /**
  6. *
  7. * @author Rodrigo
  8. */
  9. public class Circulo extends FormaGeometrica{
  10. private Double raio;
  11.  
  12. public Circulo(Point ponto, Double raio) {
  13. super(ponto);
  14. this.raio = raio;
  15. }
  16.  
  17. @Override
  18. public Double getArea() {
  19. return pi * (Math.pow(raio, 2.0));
  20. }
  21.  
  22. @Override
  23. public Double getPerimetro() {
  24. return 2*pi*raio;
  25. }
  26. }
Add Comment
Please, Sign In to add comment