Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 mainString 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 CyberBurger";
System.out.println Double Meat CyberBurger";
System.out.println Triple Meat CyberBurger";
System.out.println Jalapeno and Cheese ;
System.out.println Bacon and Cheese ;
System.out.println Salad";
System.out.printlnEnter the menu item that you want: ;
int menu intScanner.nextInt ;
System.out.printlnWould you like cheese with that? yesno;
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.
situation regarding the men if the user pro
menu cg
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
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 $ 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 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 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 $
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started