Module 3 - Lab: Developing Advanced GUI Application Search

profileMr. Goodman
CIS355A_Week3_Lab_Instructions1.docx

CIS355A Week 3 Lab

Enhanced GUI Application using Additional Swing Components

Objectives

· Create a GUI that uses JCheckBox, JRadioButton, JTextArea, and menus.

· Process multiple events.

Problem: BurgersRUs Point of Sale System

Burger Barn needs a point of sale application. The products and prices are as follows.

Burgers: single $3.50, double $4.75

Add cheese: + $.50

Add bacon: + $1.25

Make it a meal: + $4.00

Functional Requirements

You can code the GUI by hand or use NetBeans GUI builder interface.

The GUI should use JRadioButton to choose single or double burger.

· Single burger

· Double burger

It should use JCheckBox for add ons.

· Add cheese

· Add bacon

· Make it a meal

JTextField for item price, order quantity, order total

JTextArea to display the receipt

Create a menu with the following options.

File Order

Exit Add to order

Clear for next item

New order

As the user selects items, the item price should be calculated and updated accordingly.

Note that quantity should default to 1. The user can change if needed.

Once choices are made and quantity is entered, process the order using the menu options.

Order—Add to order This displays the choice and price in each text area.

Note that multiple items can accumulate in a single order.

It updates the order total.

Order—Clear for next item This clears the checkboxes. Note that quantity should default to 1.

Order—New order This clears the GUI and totals for a new order.

File—Exit This exits the program. Use System.exit(0) commad.

Sample GUI

GRADING RUBRIC

Functional Requirements

· All components on GUI created correctly

· Item price updated properly with radio and checkbox selections

· Items added to text area

· Total price accumulates correctly

· Clear for next item works correctly

· Clear for new order works correctly

· All prices displayed with two decimal places

· File exit works correctly

· Error messages for any invalid or missing user input using JOptionPane

35

Code style

5

Total

40

Code Style Requirements

· Include meaningful comments throughout your code.

· Use meaningful names for variables.

· Code must be properly indented.

· Include a comment header at beginning of each file (example below).

/****************************************************  Program Name: ProgramName.java  Programmer's Name: Student Name  Program Description: Describe here what this program will do  ***********************************************************/

Deliverables

Submit the following as a single zip folder.

· All Java files

Follow assignment specification regarding class and method names.

Note that your Java file name must match class name (do not rename).

CIS355A Week 3 Lab Instructions Page 4

image1.png

image2.png

image3.png

image4.png