HabitacionAplicacion

HabitacionAplicacion -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.io.*; i public class HabitacionAplicacion{ p public static Habitacion h1, h2, h3; public static void main(String args[]){ p h1 = new Habitacion(); h2 = new Habitacion(33, 43, "Pablo"); h3 = new Habitacion(); h h3.setLongitud(12); h3.setAnchura(12); h3.setDueño("Pablo"); h System.out.println("La habitacion de " +h1.getDueño()+ " que mide "+h1.getLongitud()+ "m. largo y "+h1.getAnchura()+ "m. de ancho, tiene un area de:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "+h1.calculaArea()+"m^2."); System.out.println("La habitacion de " +h2.getDueo()+ " que mide "+h2.getLongitud()+ "m. largo y "+h2.getAnchura()+ "m. de ancho, tiene un area de: "+h2.calculaArea()+"m^2."); System.out.println("La habitacion de " +h3.getDueo()+ " que mide "+h3.getLongitud()+ "m. largo y "+h3.getAnchura()+ "m. de ancho, tiene un area de: "+h3.calculaArea()+"m^2."); " } }...
View Full Document

This note was uploaded on 10/29/2009 for the course ITC TC-1002 taught by Professor X during the Spring '09 term at ITESM.

Ask a homework question - tutors are online