Question: JAVA Design and implement a class called Card that represents a standard playing card. Each card has a suit and face value. For your design,
JAVA
Design and implement a class called Card that represents a standard playing card. Each card has a suit and face value. For your design, create a UML Class diagram. Create a separate driver program that deals five random cards, then two specific cards that you choose. It is not necessary to ensure the cards being output are unique.
Hint: Represent the faces Ace thru King as 1 thru 13 and the suits as 1 thru 4. You need two constructors: one that receives a suit and face value as parameters, plus the default constructor where these values are randomly generated. The face and suit must have appropriate get_ and set_ methods for the numeric values, plus a get_ for the textual equivalent (e.g. getFace() might return 13 while getFaceText() would return King). Your toString method should return a nice representation of the values like Ace of Spades.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
