From the requirements: "Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a control scheme that will support this with minimal disruption to the users when this occurs. " I have created a tool factory which I call to return me a panel containing the search or booking functionality components. I then use a CardLayout to display the 2 panels based on the menu item selected. Is there a better way to implement such a control scheme?
How about no menu items except exit, and help. and just one screen that has JComboboxes for criteria Selection. One button called "Search, that when clicked fills in a JTable below it with flights. The user selects a flight from the JTable, goes to a JTextfield below it types in the number of tickets to book, and then click a "Book" button that is to the right of the JTextField. when clicked the flight gets booked as long as there are available seats and the number entered is not negative. You can then have a JOptionPane popup that shows the results of the Booking.
While I see how the approach you described meets the current functionality requirements, I'm not sure how that addresses the issue of future functionality enhancements. The wording is a little odd, I've been trying to decide myself what it implies: "it should establish a control scheme that will support this with minimal disruption to the users". That isn't the same thing as saying that you want a minimal amount of disruption in the design; I'd solve that easily enough with something like the Command pattern. What exactly constitutes a 'minimal disruption to the users' when GUI functionality changes in the future? [ June 03, 2002: Message edited by: Reid M. Pinchback ]
The whole reason for MVC is so that you can create and remove any view you want at any time without disrupting any other portion of the code. In my example I was just stating to go the simple easy route. Mark