Skip to content

Instantly share code, notes, and snippets.

@marisusis
Forked from anonymous/gist:b9c508b857fe147ad8ac0b97c7c41ab9
Last active August 3, 2016 13:56
Show Gist options
  • Save marisusis/82442d793791bb67c4f60862d68ac363 to your computer and use it in GitHub Desktop.
Save marisusis/82442d793791bb67c4f60862d68ac363 to your computer and use it in GitHub Desktop.
public enum RoomType {
}
public class Hotel {
private Room[] rooms;
public String name;
public Hotel(String name) {
this.name = name;
}
public static RoomType roomType(Room room) {
return room.type;
}
}
public class Room {
private int floor;
private int number;
protected RoomID id;
protected bool smoking;
protected bool tv;
protected bool fireplace;
public Room() {
}
public Room(int floor, int num) {
this.floor = floor;
this.number = num;
this.id = new RoomID(floor,num);
}
public void setRules(bool smoking, bool tv, bool fireplace) {
this.smoking = smoking;
this.tv = tv;
this.fireplace = fireplace;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment