Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Cubo {
- int lado;
- public Cubo(int lado){
- this.lado = lado;
- }
- public int obtenerLado(){
- return (lado);
- }
- public void setLongitudLado(int lado){
- if (lado > 0){
- this.lado = lado;
- }
- }
- public int getSuperficieCara(){
- return (lado*4);
- }
- public int getVolumen(){
- return (lado^lado*lado);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement