Question: Section: Consider the following piece of code for the Cyberburger . java import java.util.Scanner; public class Cyberburger { public static void main ( String [

Section:
Consider the following piece of code for the Cyberburger . java
import java.util.Scanner;
public class Cyberburger{
public static void main(String [] args){
// create a scanner that will handle ints
Scanner intScanner = new Scanner(
System.in);
// create a scanner that will handle Strings
Scanner stringScanner = new Scanner(
System.in);
// provide menu for Cyberburger
System.out.println("(1) CyberBurger");
System.out.println("(2) Double Meat CyberBurger");
System.out.println("(3) Triple Meat CyberBurger");
System.out.println("(4) Jalapeno and Cheese ");
System.out.println("(5) Bacon and Cheese ");
System.out.println("(6) Salad");
System.out.println("Enter the menu item that you want: ");
int menu = intScanner.nextInt () ;
System.out.println("Would you like cheese with that? (yes/no)");
String chesse = stringScanner.nextLine ();
}
}
Design a program named: CyberBurger . java, and incorporate the following:
Diagram a flowchart about how the program is working right now in terms of decisionmaking.
23
situation regarding the men if the user pro
menu c.g.,20)?
(b) Describe how you would address this situation.
(c) Decide to where would you move that statement in the program.
(d) Detect the conditions that the program shall ask for cheese.
(e) Integrate the condition from (d) in the flowchart from Question 1.
Once the input for cheese is moved, compute the total amount of money for the combo,
depending on whether the user selected cheese.
If the user selects "Yes," add $0.50 to the total.
If the user selects "No," do not add any value to the total.
(a) List the data type of the variable that handles the information of cheese.
(b) Code how statement of comparing the selection for cheese looks like.
Compute the tax of the total combo amount:
(a) The tax is 0.0825 of the total amount.
Demonstrate the result of the transaction by printing the menu item with the total price
of the order. For example, if the user selects Item 3 from the menu and selects "yes" to
cheese, your final output will look as follows:
Your order is Triple CyberBurger with cheese. Your total is $10.30.

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!