I have a bunch of room objects. I need a method to return a certain room object based on a String input.
public Room getRoom(String roomName){
//code to return the room object with the name roomName
return room;
}
I also need a way to randomly return a room object.
A room object:
Code:
public Room(String name, String description) {
this.name = name;
this.description = description;
visits = 0;
}
Thanks