PRG/421 Week 4 Java 4.15 LAB: Ticketing service (Queue)

Availability: In stock

Regular Price: $7.00

Special Price: $5.00

OR

PRG421 Week 4 Java 4.15 LAB Ticketing service (Queue)

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

Quick Overview

PRG/421 Week 4 Java 4.15 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


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!

Regular Price: $7.00

Special Price: $5.00

Details

PRG/421 Week 4 Java 4.15 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

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!

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.