Question: Task #2 The if-else-if Statement 1 Write an if-else-if statement that lets the computer choose which statements to execute by the user input size (10,

 Task #2 The if-else-if Statement 1 Write an if-else-if statement that

Task #2 The if-else-if Statement 1 Write an if-else-if statement that lets the computer choose which statements to execute by the user input size (10, 12, 14, or 16). For each option, the cost needs to be set to the appropriate amount. The default else of the above if-else-if statement should print a statement that the user input was not one of the choices, so a 12 inch pizza will be made. It should also set the size to 12 and the cost to 12.99 if (inches10) else if (inches12) else if (inches14) else if (inches 16) cost 10.99 cost 12.99 cost 14.99 cost 16.99 else System.out.printin ("An incorrect bize was entered") System.out.printin("You will receive a 12" Pizza inches 12; 2 Compile, debug, and run. You should now be able to get correct output for size and price (it will still have Hand-tossed crust, the output won't look like money, and no discount will be applied yet). Run your program multiple times ordering a 10, 12, 14, 16, and 17 inch pizza. Task #3 Switch Statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!