Don't want any code, just want some sort of guidance. Would like to keep my academic integrity in tact ;)
I keep getting that annoying error. I need to call the toString method for each Room instance. Any suggestions? I would prefer an answer within 2 hours if at all possible.
public class Hotel
{
//constant
public static final int NUM_ROOMS = 20;
//variables
public Room[] theRoom;
public String name;
public int totalDays;
public double totalRate;
public int singleCount;
public int doubleCount;
public int roomsRented;
public int NOT_FOUND;
public Hotel(String newName) {
name = newName;
Room[] Rooms = new Room[NUM_ROOMS];
}
public double getTotalRentalSales() {
return totalRate + roomsRented;
}
public double getAvgDays() {
return roomsRented/totalDays;
}
public double getAvgRate() {
return totalRate/roomsRented;
}
public int getSingleCount() {
return singleCount;
}
public int getDoubleCount() {
return doubleCount;
}
public String printRentalList() {
System.out.println("Room Information: " + Room.toString());
}
}
See Question&Answers more detail:os