-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain_Hotel.java
36 lines (34 loc) · 1.43 KB
/
Main_Hotel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package tema3;
import PaqueteLectura.Lector;
public class Main_Hotel {
public static void main (String args[]){
int numHab;
double monto = 0;
System.out.println("Cargarndo Hotel...");
System.out.print("Cuantas habitaciones tiene el Hotel?? : ");
numHab = Lector.leerInt();
Hotel h = new Hotel(numHab);
System.out.println("El hotel se ha cargado EXITOSAMENTE con "+numHab+" habitaciones.");
System.out.println("======= SISTEMA DE HOTELERIA =======");
Cliente c = new Cliente();
System.out.print("Nombre del cliente (ZZZ para terminar): ");
c.setNombre(Lector.leerString());
while (!c.getNombre().equals("ZZZ")){
System.out.print("DNI del cliente: ");
c.setDNI(Lector.leerInt());
System.out.print("Edad del cliente: ");
c.setEdad(Lector.leerInt());
System.out.print("Hola "+c.getNombre()+"! En que habitacion desea alojarse??: ");
numHab = Lector.leerInt();
h.ingresarCliente(c, numHab);
c = new Cliente();
System.out.print("Nombre del cliente (ZZZ para terminar): ");
c.setNombre(Lector.leerString());
}
System.out.println(h.toString());
System.out.print("Cuanto $$$ quiere aumentar las tarifas? : ");
monto = Lector.leerDouble();
h.aumentarPrecio(monto);
System.out.println(h.toString());
}
}