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

i want to make an interactive GUI program using Java Fx and OOPS concepts. Style

ID: 3918801 • Letter: I

Question

i want to make an interactive GUI program using Java Fx and OOPS concepts. Style the 3 scenes in this app using separate stylesheets. Upload the full project files as a zip in moodle.

The application Pizzashop will have all the choices for regular and feast pizza.

1. In the first scene, ask name, type (radiobutton)(regular,feast) and size of pizza (radiobutton)(small,medium,large) and let the user add toppings (CheckBox, check for max toppings for each of the pizza type. For regular, max is 2 and for feast,3). Show a logo on top left corner with all the title for your shop.

2. Once the user clicks a button in scene1, it takes him to scene 2 where the user sees his order details and a choice to choose his payment.(use radiobutton here). Once the user clicks a payment button in scene 2, it takes him to scene 3.

3. In scene 3, For debit and credit payment show a hyperlink window which takes the user to the respective payment sites, ex interac for debit., paypal for credit. and an image of cash for cash option.

Explanation / Answer

import java.util.Scanner;

public class PizzaStore {

public static void main(String[] args) {

int pizza;

double pizzaPrice = 0;

String name;

String pizzaSize;

String delivery;

int topping;

double deliveryFee = 2.50;

double toppingPrice = 0;

Scanner sc = new Scanner(System.in); //create new scanner class

System.out.println("What is your name?"); //gather user name

name = sc.nextLine();

System.out.println("Hello " + name + ", What size pizza would you like? 1:large = 14.99" + //records users pizza size

" 2:medium = 12.99 3:small = 10.99");

pizza = Integer.parseInt(sc.nextLine()); //grab int relative to pizza cost

if (pizza == 1) {

pizzaSize = "Large";

pizzaPrice = 14.99; //gather pizza int and convert to double

}

else if (pizza == 2) {

pizzaSize = "Medium";  

pizzaPrice = 12.99;

}

else if (pizza == 3) {

pizzaSize = "Small";

pizzaPrice = 10.99;

}

do

{

System.out.println("What toppings would you like? Choose 2 1) Olives = 1.29" +//do while loop for toppings

" 2) Mushrooms = 1.49 3) Pepperoni = 1.79" +

" 4) Pineapple = 1.59 5) Done with toppings");

topping = Integer.parseInt(sc.nextLine());

if (topping == 1) //if Olives are chosen, initalize toppingPrice to 1.29

toppingPrice = 1.29;

else if (topping == 2)

toppingPrice = 1.49;// if Mushrooms are chosen initalize value of toppingPrice too 1.49

else if (topping == 3)

toppingPrice = 1.79;//if Mushrooms are chosen initialize value of toppingPrice to 1.79

else if (topping == 4)

toppingPrice = 1.59;//If pineapple is chosen initalize value of toppingPrice to 1.59

} while (topping < 5); //get the topping Int, aslong as its under 5 loop will continue to run

double totalCost = pizzaPrice + toppingPrice;

double totalCostD = pizzaPrice + toppingPrice + deliveryFee;

System.out.println("Do you want delivery? Enter yes or no");

delivery = sc.nextLine();

if (delivery.equals("yes")) {

System.out.println("Hello"+" " + name + " here is your order:" +" " + pizzaPrice +

" Toppings:" + toppingPrice + " delivery 2.50 "

+ " Total cost "+ totalCost);//invoice if user types in yes

}

if (delivery.equals("no")) {

System.out.println("Hello"+" " + name + " here is your order:" +" " + pizzaPrice +

" Toppings:" + toppingPrice +

" Total cost: "+ totalCost); //invoice if user types in no

}

}

}