I am making a small hotel program. I have two classes so far which are Room.java and Hotel.java. I have just begun to create the HouseManager class which calls methods from the previous two classes but i am having trouble getting it to work. In this case the user enters the number of guests needing accommodation, the value is passed to gethotelAvailableRooms method of the hotel object, the returned string is captured and displayed. The method gethotelAvailableRooms is: public String gethotelAvailableRooms (int noGuests) { String availRooms=""; for(i = 0; i < aPub.length; i++) { if(aPub.isBooked = false && aPub.getnumberBeds() >= noGuests) availRooms=availRooms + i + ","; } return availRooms; }
and what i have so far is this: { int noGuests; System.out.println( "How many guests are there?"); noGuests = kb.getInt(); System.out.println( "The following rooms are available:");