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 objectoriented implementation of 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 or indicating the versi on to play. If version 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 cshw The entry point of your program should be the main method
of a class named WarGame in a package named hw
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 the players' scores are the number
of cards in their hands. For variations and the scores are the number of cards in their points piles. For
example:
Player plays THREE of SPADES
Player plays JACK of DIAMONDS
Player wins the round
Player has a score of
Player has a score of
Player plays SEVEN of HEARTS
Player plays SEVEN of CLUBS
WAR!
Player plays TEN of CLUBS
Player plays FIVE of HEARTS
Player winds the round
Player has a score of
Player has a score of
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 with the exception that no java file may be longer than 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 of the SOLID andor 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
