Forked from anonymous/gist:b9c508b857fe147ad8ac0b97c7c41ab9
Last active
August 3, 2016 13:56
-
-
Save marisusis/82442d793791bb67c4f60862d68ac363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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