https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/9 import java.util.Scan X FREE AI Java Code zy Section 14.9 - CS 13 X Search Results | Cou X G Google Homepage - Princip X Georgia Gateway A ☆ [] Help/FAQ = zyBooks My library > CS 1302: Principles of Programming II home > 14.9: LAB: Ticketing service (Queue) Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending with-1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue. Include print statements as shown in the example below. Ex: If the input is: Zadie Smith Tom Sawyer You Louisa Alcott -1 19°C Mostly cloudy the output is: Welcome to the ticketing service... You are number 3 in the queue. Zadie Smith has purchased a ticket. You are now number 2 Tom Sawyer has purchased a ticket. You are now number 1 You can now purchase your ticket! 555804.3482728.qx3zqy7 LAB ACTIVITY 14.9.1: LAB: Ticketing service (Queue) 4/10 TicketingService.java Load default template... 1 import java.util.Scanner; 2 import java.util.LinkedList; 3 import java.util.Queue; 4 5 public class Ticketing Service { public static void main (String[] args) { Scanner scnr = new Scanner(System.in); String personName = ""; 9 10 int counter = 0; 11 int youPosition; Search + " + $ Marlon Barrera Rondon ▼ 9:44 AM 4/18/2024

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter15: Using Javafx And Scene Builder
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/9
import java.util.Scan X
FREE AI Java Code
zy Section 14.9 - CS 13 X
Search Results | Cou X
G Google
Homepage - Princip X
Georgia Gateway
A
☆
[]
Help/FAQ
= zyBooks My library > CS 1302: Principles of Programming II home > 14.9: LAB: Ticketing service (Queue)
Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending
with-1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue.
Include print statements as shown in the example below.
Ex: If the input is:
Zadie Smith
Tom Sawyer
You
Louisa Alcott
-1
19°C
Mostly cloudy
the output is:
Welcome to the ticketing service...
You are number 3 in the queue.
Zadie Smith has purchased a ticket.
You are now number 2
Tom Sawyer has purchased a ticket.
You are now number 1
You can now purchase your ticket!
555804.3482728.qx3zqy7
LAB
ACTIVITY
14.9.1: LAB: Ticketing service (Queue)
4/10
TicketingService.java
Load default template...
1 import java.util.Scanner;
2 import java.util.LinkedList;
3 import java.util.Queue;
4
5 public class Ticketing Service {
public static void main (String[] args) {
Scanner scnr = new Scanner(System.in);
String personName = "";
9
10
int counter = 0;
11
int youPosition;
Search
+
"
+
$
Marlon Barrera Rondon ▼
9:44 AM
4/18/2024
Transcribed Image Text:https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/9 import java.util.Scan X FREE AI Java Code zy Section 14.9 - CS 13 X Search Results | Cou X G Google Homepage - Princip X Georgia Gateway A ☆ [] Help/FAQ = zyBooks My library > CS 1302: Principles of Programming II home > 14.9: LAB: Ticketing service (Queue) Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending with-1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue. Include print statements as shown in the example below. Ex: If the input is: Zadie Smith Tom Sawyer You Louisa Alcott -1 19°C Mostly cloudy the output is: Welcome to the ticketing service... You are number 3 in the queue. Zadie Smith has purchased a ticket. You are now number 2 Tom Sawyer has purchased a ticket. You are now number 1 You can now purchase your ticket! 555804.3482728.qx3zqy7 LAB ACTIVITY 14.9.1: LAB: Ticketing service (Queue) 4/10 TicketingService.java Load default template... 1 import java.util.Scanner; 2 import java.util.LinkedList; 3 import java.util.Queue; 4 5 public class Ticketing Service { public static void main (String[] args) { Scanner scnr = new Scanner(System.in); String personName = ""; 9 10 int counter = 0; 11 int youPosition; Search + " + $ Marlon Barrera Rondon ▼ 9:44 AM 4/18/2024
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L