Question
This question involves playing virtual war and the use of a random number generator to simulate a deal. A Card object simulates a card with
This question involves playing virtual war and the use of a random number generator to simulate a deal. A Card object simulates a card with face value of 1-10 . The class supports the following behaviors:
- Create new Card object (no parameters)
- dealing the hand and determining the winner.
- Reporting the current percentage of hands won.
To do this, the class should maintain the following variables:
- playerCard (int)
- computerCard (int)
- wins (double)
- games (double)
Write the complete Card class. Your implementation must meet all specifications
IN JAVA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started