Question: I need this code written in Java. In this assignment, you will design and build an object - oriented implementation of 3 variations of the

I need this code written in Java.
In this assignment, you will design and build an object-oriented implementation of 3 variations of the card
game, War. The rules for War are at the end of this assignment.
Your program will use its command line arguments to determine which version to play. The first
command line argument will be either 1,2, or 3 indicating the versi on to play. If version 1 is selected,
then the second command line argument will be the maximum number of rounds to play. For each
version, the last command line argument is a number that is to be used as a seed for your random number
generator. This will allow a game to be replayed with the same results.
Create a Maven project named cs4773-hw2. The entry point of your program should be the main method
of a class named WarGame in a package named hw2.
Game play is written to standard output. For each round, indicate the cards played by each player as well
as which player won the round, and all players' scores. For variation 1, the players' scores are the number
of cards in their hands. For variations 2 and 3, the scores are the number of cards in their points piles. For
example:
Player 1 plays THREE of SPADES
Player 2 plays JACK of DIAMONDS
Player 2 wins the round
Player 1 has a score of 8
Player 2 has a score of 6
Player 1 plays SEVEN of HEARTS
Player 2 plays SEVEN of CLUBS
*** WAR! ***
Player 1 plays TEN of CLUBS
Player 2 plays FIVE of HEARTS
Player 1 winds the round
Player 1 has a score of 14
Player 2 has a score of 6
At the end of the game, print the name of the winner, or if it is a tie, then declare that the result is a tie.
For this project, you must:
Have two or more packages with at least one package that does not import classes from any of the
project's other packages (reducing coupling)
Submit clean, readable code just as in the first assignment. Follow the clean coding practices (including
DRY) from homework assignment 1 with the exception that no .java file may be longer than 150 lines
including blank lines and comments. Error handling must be done with unchecked exceptions. In Java,
unchecked exceptions are instances of the RuntimeException class (or a subclass of RuntimeException).
Implement a total of at least 4 of the SOLID and/or GRASP principles. Include a README.txt file in
your project that lists and explains which classes are implementations of which principles.
Produce a Java dass diagram (as a .png or .jpg file) of all your classes in their respective packages and
the dependencies between them.
I need this code written in Java. In this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!