Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, you will use the same classes you created in Project phase I ( PizzaOrder, Delivery, ToGo, and Seated ) and build a

For this assignment, you will use the same classes you created in Project phase I ( PizzaOrder, Delivery, ToGo, and Seated) and build a javafx GUI to provide input and output as follows:

Your Driver class should first build and display a GUI containing the following items:

customerName ( String ) default empty

orderType (ToGo, Delivery, or Seated) default ToGo

pizzaSize (int 1 = SMALL, 2=MEDIUM, and 3 = LARGE) default 1 (SMALL)

List of Toppings ( at least three: Onions, Olives, and Green Peppers ) default none

toppingPrice ( double ) - default (10)

orderPrice ( double ) default (0.0)

You are free to design your interface, but you need to at least use ONE OF EACH of the following ( you may use more that one of each if you like):

Label

Button

CheckBox

RadioButton

ComboBox

TextField

The default GUI displayed should NOT have any Labels or Text fields for tripRate (double), zone (int), ServiceCharge (double), nor numberOfPeople (int). As soon as the user selects a pizza order of type Delivery, a tripRate label and text field as well as a zone label and text field should appear appropriately and if he/she selects a pizza order of type Seated then the tripRate and zone Labels and Textfields should disappear and get replaced by a serviceCharge and numberOfPeople Labels and Textfields appropriately. When the user selects a ToGo pizza order then tripRate + zone OR serviceCharge + numberOfPeople labels and textfields should disappear from the GUI.

Your GUI should include three buttons at the bottom labeled ProcessOrder, PrintOrders, and Reset respectively.

After the user fills the form and presses the button ProcessOrder your program should do the following:

Your program should create an appropriate object based on the pizza order type selected ( ToGo, Delivery, or Seated) using the data provided by the user in the GUI.

Add the created pizza order object to an ArrayList of type PizzaOrder called orders.

Use the created object to calculate the orderPrice and display it to the GUI.

You do NOT need to check for valid text field inputs (double, int, ). You may assume that the user enters valid data for each of the text fields.

Pressing the button labeled PrintOrders should sort and print a list of customer names and order prices for orders saved in ArrayList orders to a separate stage ( different from the original GUI ).

Pressing the Reset button should reset ALL items and fields to their default values as specified above as well as remove all the orders from the ArrayList orders.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions