how am i supposed to do the reservation,and select rooms for 2 persons or one and rooms that overlook the sea or the road
Could you please post your whole assignment, including the GUI-code you have written so far?
tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
Forget the GUI for the moment. Go back to where you should have started, which is the hotel model. You need to design some simple classes for entities such as Room ( attributes: no of beds, sea view etc), Hotel (a collection of Rooms with methods for finding vacant Rooms with specific attributes), and Reservation (person, Room, dates etc).
Define these classes with simple constructors, and public methods for the things you want to do (eg find a twin room with sea view, create a new Reservation for that Room).
Write some simple hard-coded tests in a main(..) method to make sure they work.
Now go back to the GUI - your ActionPerformed will just be just like the tests you coded but with data from the GUI fields.
JamesCherrill
Posting Genius
6,337 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,070