Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JavaFX You are building a software for a pizza shop that has gone high-tech with

ID: 3572441 • Letter: J

Question

JavaFX

You are building a software for a pizza shop that has gone high-tech with touch displays allowing customers to order themselves and pick up their order when it is ready! The pizza shop sells three kinds of pizza (cheese, vegetable, and pepperoni). The customers can order slices of any of the pizza kinds they prefer. Each pizza has 8 slices.

Requirements:

1- The interface of the shop displays a the name of each type of pizza with a drop down of how many slices the user desires (maximum 8, minimum of 0). Also you need to include a picture for each type of pizza, and buttons for placing the order and reseting input to zero.

2-When the user places the order:
a. The Total price has been updated. b. The number of slices that the user picked are taken from the pizzas (i.e. the pizza image now shows part of it missing). c. The button ‘Place order’ becomes inactive d. A new Label/Text appears saying something like “Thank you for shopping with us. Enjoy your pizza!” e. A new button appears to Reset the screen.

3- After clicking on Reset button, theoriginal interface will appear again with FULL pizzas and choice boxes have the choices from 0 (no slices) to 8 (whole).

Explanation / Answer

package Pizza;

import ingredients.Vegetable;

public class NYStylePizzaStore extends PizzaStore {

           

            private final String CHEESE="cheese";

            private final String PEPPERONI="pepperoni";

            private final String VEGGIE="veggie";

           

            @Override

            protected Pizza createPizza(String type,Vegetable[] vegetable) {

                        Pizza pizza = null;

                        PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();

                        if(type.equalsIgnoreCase(CHEESE)){

                                    pizza = new CheesePizza(ingredientFactory);

                                    pizza.setName(CHEESE);

                        }else if (type.equalsIgnoreCase(PEPPERONI)){

                                    pizza = new PepperoniPizza(ingredientFactory);

                                    pizza.setName(PEPPERONI);

                        }else if(type.equalsIgnoreCase(VEGGIE)){

                                    pizza = new VeggiePizza(ingredientFactory);

                                    pizza.setName(VEGGIE);

                        }

                        return pizza;

                       

            }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote