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

Create a pizza pricing application shown as follows MainActivity rust Topping Cr

ID: 3742030 • Letter: C

Question

Create a pizza pricing application shown as follows MainActivity rust Topping Crispy Thick Soggy Anchovies Pineapple Garlic Okra o go or no? At restaurant Pickup Deliver Size 29 in $33.03 o o o $.05 per square inch $.05 per topping per square inch Different crust types * No surcharge for crispy .$2.50 extra for thick crust * S5.00 extra for soggy crust o Different delivery options At the restaurant or pickup, no charge Delivery charge is $3.00 * * The application will react whenever the state of a control changes

Explanation / Answer

I am giving you a pseudo code for implementing the calclation of price . I hope it helps.

Lets say we store inputs from the customer in the following variables.

size - Stores the size in square inches.

top - Stores the topping. it is a binary variable it stores "True" or "False".

crust - Stores the crust type.

del - Stores the delivery options. it is a binary variable it stores "True" or "False".

Now

We have a variable called "price" which stores the price of the pizza and initially store 0.

price =size*0.05;

if(top=="true")

{ price = price+size*0.05;

}

else price remains same

if(crust=="thick")

{

price = price + 2.50;

}

else if(crust=="soggy")

{ price=price+5.00; }

else price will not change ;

if(del=="True")

{ price =price + 3.00;}

else price will not change;

So after checking all these conditions we get the final price of the pizza stored in variable "price".

I hope this helps you with your application.

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