blic class Pickupwindow extends ConsoleProgram ublic void run() // Display menu String menu = "1. Hamburger\n2. Cheeseburger\n3. Veggie Burger\n4. Nachos System.out.println(menu); // Get customer order String customerorder = readLine("Enter label: "); // 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 "
blic class Pickupwindow extends ConsoleProgram ublic void run() // Display menu String menu = "1. Hamburger\n2. Cheeseburger\n3. Veggie Burger\n4. Nachos System.out.println(menu); // Get customer order String customerorder = readLine("Enter label: "); // 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 "
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
solve in java

Transcribed Image Text:1
public class Pickupwindow extends ConsoleProgram
2-
public void run()
{
// Display menu
String menu = "1. Hamburger\n2. Cheeseburger\n3. Veggie Burger\n4. Nachos\n5. Hot Dog\n";
3
6
7
8
system.out.println(menu);
9
// Get customer order
string customerorder = readLine("Enter label: ");
10
11
12
13
14
15
16
// 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
17
18
19
20
Integer comboNumber =
21
// Print out what the customer ordered
System.out.println("Customer ordered number
22
23
24
25
26
}
27

Transcribed Image Text: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
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education