subject

35 POINTS In Java PLS
This program is the beginning of an automated order machine. You are programming the piece that gets the number of the order from the label sent to you by the ordering machine.

The ordering machine is simulated with user input. It sends a full label, such as ā€œ3. Veggie Burgerā€.

Fill in the missing code
Your task is to get the number out of the string. To do this, you need to isolate the number by using substring. Then use Integer. valueOf, a static method of Integer that takes a String and returns the integer value contained in the String.

The final program should look something like this

1. Hamburger
2. Cheeseburger
3. Veggie Burger
4. Nachos
5. Hot Dog

Enter label:
5. Hot Dog
Customer ordered number 5

This is the code given:
import java. util. Scanner;

public class PickupWindow
{
public static void main(String[] args)
{
// Create scanner object
Scanner input = new Scanner(System. in);

// Display menu
String menu = "1. Hamburger\n2. Cheeseburger\n3. Veggie Burger\n4. Nachos\n5. Hot Dog\n";

System. out. println(menu);

// Get customer order
System. out. println("Enter label: ");
String customerOrder = input. nextLine();

// Use substring to get the first character (the number)
String combo =

// Create an Integer object by using the static
// method Integer. valueOf(someString)
// to turn the string into an Integer

Integer comboNumber =

// Print out what the customer ordered
System. out. println("Customer ordered number "

}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
35 POINTS In Java PLS
This program is the beginning of an automated order machine. You are pr...
Questions
question
Social Studies, 26.06.2019 16:00
question
Mathematics, 26.06.2019 16:00
question
Mathematics, 26.06.2019 16:00