You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

49 lines
904 B

import java.util.ArrayList;
public class Hotel {
public static ArrayList<Hotel> lista = new ArrayList<Hotel>();
private String nombre;
private String ciudad;
private int estrellas;
public Hotel(String nombre, String ciudad, int estrellas) {
this.nombre = nombre;
this.ciudad = ciudad;
this.estrellas = estrellas;
}
@Override
public String toString() {
return nombre + ciudad + estrellas;
}
public String datos() {
return "'" + this.nombre + "','" +
this.ciudad + "'," +
this.estrellas + "\n";
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getCiudad() {
return ciudad;
}
public void setCiudad(String ciudad) {
this.ciudad = ciudad;
}
public int getEstrellas() {
return estrellas;
}
public void setEstrellas(int estrellas) {
this.estrellas = estrellas;
}
}