Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Future Enhancements

 
Wickes Potgieter
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic