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

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 Databases Questions!