112k views
1 vote
For a starting grade of 'C,' you must provide a user interface that allows the user to create a new order, add items to that order, place or cancel the order. The GUI must also display a menu containing the names of all the items for sale. It should also have a means to show all of the orders that have been placed; this last can be written to by calling displayOrders in the cafe. You may implement the above requirements however you'd like, but the following is strongly suggested:

Develop these windows:

Startup Window:
This window has three buttons:
a) New Order
b) Display Orders
c) Quit

The Display Orders button should simply call the method in the class that prints all of the orders to the command line. You might want to work on this one early so that you can see if things are working. The New Order button begins a new order (calling the cafe object to do so). It should then bring up an Order Window. The user should be able to continue creating as many orders as desired by clicking the new order button. (You may have multiple Order Windows visible at once or a single window. This is up to you. Be careful here. If you allow multiple windows you must build them each time; if you allow only one, you must check to see if it is already visible.

Order Window:
This window allows the user to order items. Note that you will need to pass the cafe object and the order id to this window (via the show method) so that the window can add items to the order. You should show a list of all of the possible items. This list is probably best placed in a:
a) ComboBox
b) ListBox
c) TextField
d) RadioButton

You do not need to display the prices at this time, only the names. The user should be able to select an item from the list. At the bottom of this window should be three buttons:
a) Add Selected Item
b) Place Order
c) Cancel Order

The Add Selected Item button should bring up an Add Purchase Window.

Add Purchase Window:
The user should be able to add as many items to the order as they want. They can exit the window by either selecting:
a) Place Order
b) Cancel Order
c) Add Another Item
d) Remove Item


a) Add Selected Item
b) Place Order
c) Cancel Order
d) Add Another Item

1 Answer

1 vote

Final answer:

The question asks for the development of a user interface for a cafe order system, specifically including a Startup Window, an Order Window, and an Add Purchase Window, with functionalities spanning order creation, item selection, and order management.

Step-by-step explanation:

The question relates to creating a user interface (UI) for a cafe order system as part of a software development project. The UI needs to facilitate creating and managing orders, displaying a menu, and showing all placed orders. Specifically:

  • A Startup Window with buttons to create a new order, display existing orders, and quit the application.
  • An Order Window for selecting items to order through a UI component like a ComboBox or ListBox. This window should include the options to add the selected item to the order, place the order, cancel the order, or manage additional items.
  • The Add Purchase Window allows users to add or remove items from their order, and to finalize or cancel their order.

Developing these interfaces requires careful attention to both the user experience and the backend logic that connects the UI to the system's ordering functionalities. The Display Orders button should call a method to output all orders, aiding in testing the system's functionality. Moreover, careful consideration is needed when deciding whether to allow multiple Order Windows or a single reusable window, and the associated UI handling that each option requires.

User Ron Cemer
by
7.7k points