Everyone is encouraged to work with one lab partner on this assignment. If you do work with a partner, submit one solution with both of your names on it. Also, please look at the class collaboration policy so that you know what is and what isn't allowed.
A company named ShuffleMaster specializes in, among other things, making card shufflers that casinos in Las Vegas can use. In this program, we are going to simulate how one of these shufflers might work using software.
When the program is run, it requires two inputs from a user:
The program may assume that the inputs will be legal ones. It is up to you to decide how to acquire the inputs (text input, command line arguments, a GUI, etc.)
Initially a queue containing 52 cards should be constructed. The initial ordering of the queue (from front to back) should be 2 of clubs, 3 of clubs, 4 of clubs, 5 of clubs, 6 of clubs, 7 of clubs, 8 of clubs, 9 of clubs, 10 of clubs, jack of clubs, queen of clubs, king of clubs, ace of clubs, 2 of diamonds ... ace of diamonds, 2 of hearts ... ace of hearts, 2 of spades ... ace of spades.
Each time that a shuffling operation should be performed, the program should perform the following actions.
At the end of the simulation, the program should print out the shuffling mode used (either normal or random), the number of shuffling passes made, and the final ordering of the 52 cards.
You must use and implement the following queue interface in your solution:
public interface QueueInterface
{
public void makeEmpty();
public boolean empty();
public void enqueue (Object data);
public Object dequeue ();
public Object peek();
}
You are not allowed to use any operations other than these to manipulate your queue.
E-mail your code to Mike Thiesen at mthiesen@gmail.com in one message before the due date. Zip your relevant BlueJ folder up so that you only need to send Mike one file. The subject of the message should be: CS221-xx program4 your-names. The xx is the number of your lab section. Late programs will not be accepted for credit. If you aren't finished by the deadline, submit whatever you have - partial credit is possible.