Reference no: EM131274415
Assignment Number:
Folder Name: LinkedWar
Create the classes War, Card, Deck, ListNode, Queue, LinkedQueue, and EmptyStructureException to play War. These classes can be found in the textbook: Data Structures and Algorithms in Java by Peter Drake on pp. 108-113, 120-124, 159, and 166.
Make the following modifications to War
1. The highest card is an Ace and the lowest card is a Two.
2. Use a linked representation for the Queue using the classes
ListNode and LinkedQueue.
3. Change stack1 and stack2 in War.java to queue1 and queue2.
There will be no Stack and LinkedStack in War.
4. The queues in the program are really pseudoqueues. To access the
rear of the queue, using a new queue method like peek or getLastElement, to get the last element put in the queue to determine who wins the round.
5. Add a counter to print the Round Number and to print how many cards are in each player's hand. Add a size variable to the LinkedQueue and a LinkedQueue method getSize which return the size of the queue.
6. In the Deck class, instead of initializing the cards array with nested for loops and then shuffling the deck, read the cards in from a file in your War folder called "Cards". The Cards file will have 52 lines (one for each card) and each line will contain 2 characters like Ad, 2c, Js, 9d, etc. Translate the characters to rank and suit and put them in the cards array. Use the FileInputOutput class as an example how to do I/O from files.
7. The dialog of the game will look something like this.
How they fit into the shopping activities of local residents
: A telephone survey has been conducted to identify strengths and weaknesses of these areas and to find out how they fit into the shopping activities of local residents.
|
Did employees have an expectation of privacy
: Did Arch Wireless violate privacy laws by providing transcripts to the city? Did employees have an expectation of privacy in their messages?
|
Identify the audience you wish to target
: Briefly describe and justify the theory in which you will use to support your campaign, Explain the initial methods you plan to use to create your public health campaign and explain why you selected those methods and Briefly describe your goals for ..
|
What are the advantages of using ceramic-matrix composites
: What are the principle advantages of the Arall material compared with those of unreinforced aluminum?
|
Create the classes war card deck listnode and queue
: Create the classes War, Card, Deck, ListNode, Queue, LinkedQueue, and EmptyStructureException to play War. These classes can be found in the textbook.
|
Determine the right person for the job
: For this assignment, you should create a plan to hire an employee for a position within your organization to support a recent change. In this plan, you should include the following:
|
The complaint asserting that the communications decency act
: MySpace sought to dismiss the complaint, asserting that the Communications Decency Act immunizes the company from liability. What was the result?
|
Relationship between ethics and the law
: Look at the relationship between ethics and the law and suggest why some companies opt to behave illegally and what may lead them to engage in illegal activities.
|
Give sample code to implement the fibonacci series
: You approach others in your department about the possibility of using recursion, and a few of them are not familiar with how it works. Describe recursion and give sample code to implement the Fibonacci Series.
|