Create a JavaFX application named YourName_PizzaApp.

Add a comment including your Name and Date. Be sure to make comments throughout your document that include the step number.

All variables, method names, and object names must begin with your initials. Example: psSizeField, psCalculateButton, psCalculateButtonClicked. Provide all necessary imports.

Figure: see image.

1. Create a GridPane, Scene, TextFields, Labels, and Buttons as shown above. Use your name as the title of the Pizza App.

2. Create code for the Exit button.

3. Create code for the CalculateButtonClicked method.

  • Use two arrays that will hold the Size and Prices of the pizzas.
  • Use an if statement to select the correct price related to the pizza size.
    • Multiply the Qty by the PriceArray to determine the Price variable
    • Display the results in the PriceField.

4. Create Validation code for the text fields. Provide alerts with appropriate header text and content text for both text fields

  • The pizza size field cannot be empty and the qty field must be an integer.

Your program must run and be free of syntax errors.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.