Question: Write a class that defines an enumerated type named Rank with values ace, two, three four, five, six, seven, eight, nine, ten, jack, queen, king.

 Write a class that defines an enumerated type named Rank with

Write a class that defines an enumerated type named Rank with values ace, two, three four, five, six, seven, eight, nine, ten, jack, queen, king. The main method should do the following: Declare variables highCard, faceCard, cardI, and card2 of type Rank. Assign highCard to be an ace, faceCard to be a jack, queen or king (your choice), and cardl Print a line, using the highCard and faceCard objects, in the following format: Print a line, using the cardl and card2 objects and the name method, as follows: and card2 to be two different numbered cards (two through ten - your choice). A blackjack hand: ace and . .. . (The faceCard variable should be printed instead of the dots.) A two card hand: (print cardl and card2) This program should be written 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!