Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pizza App For this assignment you are going to implement a JavaFX program that allows customers to order a pizza at Ralphs Pizza. You need

Pizza App

For this assignment you are going to implement a JavaFX program that allows customers to order a pizza at Ralphs Pizza. You need to read the array chapter in your text before doing this assignment. In particular, note that our look-up tables are implemented as 2-dimensional arrays.

The opening screen for the app is shown below.

Declare all of the controls. Radio buttons need to be assigned to a toggle group. Since you have two sets of radio buttons, you will need two toggle groups.

Choose either a grid pane or a vbox for your main pane. Set the padding and spacing for the main pane.

Create the title label and change its font and set its max width to Double.Max_Value.

In this program you need to place controls in titled panes. In the size and crust titled panes you want to use an hbox to hold the radio buttons. Set the spacing and padding for the two hboxes. Place the radio buttons inside the hbox and then place the hbox inside the appropriate titled panes.

In the toppings pane you probably want to place the check boxes inside a grid. Place the sausage and olives check boxes in row 0. Place the pepperoni and mushroom check boxes in row 1 and place the salami and peppers check boxes in row 2. Set padding and spacing for the grid. Then place the grid inside the toppings titled pane.

The button bar at the bottom of the form is just an hbox with the two buttons, a label and a text field.

If you chose a vbox for your main pane, put the title label, the size titled pane, the crust titled pane, the toppings titled pane and the button hbox in the main vbox.

If you use a grid pane for your main pane, put the title in row 0, the size titled pane in row 1, the crust titled pane in row 2, the toppings titled pane in row 3, and the button hbox in row 4.

The default state for the app is a small, thin-crust pizza with no toppings. The price of a pizza depends on the chosen size, type of crust and toppings. The prices for these options are given in the two tables below. In a user-defined method, your program should implement these two tables as multi-dimensional arrays. Your method should then compute the price of the pizza based on look-ups into these tables.

Price Table for Plain Cheese Pizza

Small

Medium

Large

Thin

5.85

8.75

12.00

Thick

6.50

9.75

12.75

Deep Dish

8.00

11.00

13.75

Price Table for Toppings

Small

Medium

Large

Meat

1.25

1.75

2.25

Veggies

0.50

0.75

1.00

The Clear button resets the app to its original state.

You need to thoroughly test your program by computing the price for a number of test cases. I will run your program with a number of different options. Programs that do not compute the correct price do not meet specifications. When I grade this program I will also look at how you created the user-interface and how you defined the procedure for calculating the price. Programs that do not have a user-defined method that uses look-up tables to determine the price, do not meet specifications.

image text in transcribed

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 Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago