You've been hired by Biggy’s Popcorn to write a Java console application that
handles popcorn orders at their store. The application has the following two
This class represents a customer in line who wants to buy popcorn and includes:
static total order amount – count of all popcorn bags sold.
order amount – the number of popcorn bags the customer wants.
next – a pointer to the next Order in the queue.
A constructor with no parameters that set the fields, respectively, to these
order amount = -1
next = null
total order amount = total order amount + orderAmount
order amount – set from parameter
next – set from parameter
total order amount static).
This class contains the main method and maintains a queue of Orders. Create text
file Events.txt, paste the following data into it, and place the file in your project
folder. It has the following columns:
1) Event type – this will be either:
CQ means a customer entered the back of the line.
CH means the order was handled for the customer at the front of the
2) Order amount – the number of popcorn bags the customer wants.
Read the data from file Events.txt. For each event, print an event number, event
type, amount ordered, line length (number of customers in line), and the result of
the processed event. Represent the customers in line with a queue (yes, the data
structure). Use a linked list, not an array or array list. Create the following