Last active
August 17, 2017 03:18
-
-
Save BrunoDSouza/bf8c28408e993aefa29fb0fda508b815 to your computer and use it in GitHub Desktop.
Exercicio Circulo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Circulo { | |
private double raio; | |
public Circulo(double value){ | |
this.raio = value; | |
} | |
public double getArea(){ | |
return Math.PI * Math.pow(raio, 2); | |
} | |
public double getDiametro(){ | |
return raio * 2; | |
} | |
public double getPerimetro(){ | |
return 2 * Math.PI * raio; | |
} | |
public double getRaio() { | |
return raio; | |
} | |
public void setRaio(double value) { | |
this.raio = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment