Welcome to AssignmentCache!

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

Availability: In stock

$7.00

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!

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

  • PRG421 Week 4 Java 4.15 LAB Ticketing service (Queue)
$7.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!

Additional Information

Special Price $3.00

Product Tags

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

[profiler]
Memory usage: real: 18087936, emalloc: 17900872
Code ProfilerTimeCntEmallocRealMem