Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package formageometrica;
- import java.awt.*;
- /**
- *
- * @author Rodrigo
- */
- public class Circulo extends FormaGeometrica{
- private Double raio;
- public Circulo(Point ponto, Double raio) {
- super(ponto);
- this.raio = raio;
- }
- @Override
- public Double getArea() {
- return pi * (Math.pow(raio, 2.0));
- }
- @Override
- public Double getPerimetro() {
- return 2*pi*raio;
- }
- }
Add Comment
Please, Sign In to add comment