Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are expected to create three Java file and one .jar files. o PizzaSelectionFrame.java o PaymentFrame.java o PizzaSelectionTest.java o PizzaSelectionFrame.jar Do not drag and drop

image text in transcribedimage text in transcribedimage text in transcribed

You are expected to create three Java file and one .jar files. o PizzaSelectionFrame.java o PaymentFrame.java o PizzaSelectionTest.java o PizzaSelectionFrame.jar

Do not drag and drop components.

Write a simple pizza order application. Please apply the following requirements for the application. a. Create a PizzaSelectionFrame with FlowLayout. Do not forget that your components will be displayed in which order they are added. b. Title of the frame will be Order Pizza. c. You need a combo box which includes a list of pizza: chicken pizza, pepperoni pizza, and veggie pizza. d. When a user selects a pizza from the list, display the related icon in a label. Icons are also uploaded with your assignment. (Hint: you need to implement ItemListener interface and override itemStateChanged method). By default, display any icon. e. You need a label to display Select Size:. f. You need three radio buttons (and a button group) to display the size of Small, Medium, and Large. Small size will be selected by default. g. You need a label to display Select Topping(s):. h. You need two check boxes to display the toppings of Mushroom and Bacon. i. You need a Submit Order button. j. Frame size will be 325 * 300. k. You must set the background color of your pane as LIGHT_GRAY.

image text in transcribed

l. When a user clicks Submit Order button, you will display an Option Dialog. i. A user can select any size of pizza without any toppings.

image text in transcribed

ii. A user can select any size of a pizza with two toppings.

image text in transcribed

iii. A user can select any size of a pizza with one of the toppings.

image text in transcribed

iv. In your message, you will display Order Summary: size of a pizza with the list of toppings (if any). (Hint: you will only add an action listener for your button, so you will need Action Listener Interface and override actionPerformed method).

m. The syntax of Option Dialog is:

i. JOptionPane.showOptionDialog(PizzaSelectionFrame.this, "Your Message", "Your Title", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null); ii. If a user clicks OK, then he/she must view PaymentFrame. iii. If a user clicks Cancel, then he/she must view again PizzaSelectionFrame. iv. The syntax in i returns an int value. If it is 0, it means that the user clicked OK. Otherwise, it means that the user clicked CANCEL.

n. If a user clicks on OK, PaymentFrame will be displayed. o. In this frame, you will have five labels and five text fields (size is 20). Title of the frame is Payment. p. You need a GridLayout (2 rows, 6 columns, 5 px horizontal gap, 5 px vertical gap). q. You must set the background color of your pane as LIGHT_GRAY. r. You must set the size of the frame as 600*200.

image text in transcribed

s. When a user clicks Pay button. You must display a message in a Message Dialog Box, and you must exit the system. (Hint: System.exit(0);) t. Additionally, if a user clicks x to close the window, you must quit the application. u. Your message will be Your order will be delivered in 30 minutes.

image text in transcribed

Order Pizza Order Summary: small size chicken pizza OK Cancel Select Topping(s): C Mushroom Bacon Submit Order Confirmation Order Summary: medium size pepperoni pizza with mushroom and bacon OK Cancel Confirmation Order Summary: medium size pepperoni pizza with mushroom OK Cancel Payment Name and Surname: Address: Credit Card Number: Expiration Date: CVC: Pay Payment Name and Surname: Address: Credit Card Number: Expiration Date: CVC: Message Your order will be delivered in 30 minutes OK Pay

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_2

Step: 3

blur-text-image_3

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago