oblem deals with playing cards. The Card API is given below:
public class Card {
1-
}
. suit is "Clubs", "Diamonds", "Hearts",
denomination is "2","3","4","5", "6", "7", "8","9", "10", "J",
or "Spades"
or "A"
value is the value of the card number if the card denominat.
is between 2 and 10; 11 for J, 12 for Q, 13 for K, 14 for A
public Card(String suit, String denomination){}
//returns the suit (Clubs, Diamonds, Bearts, or Spades)
public String getSuit(){}
// returns the denomination (2,3,4,5,6,7,8,9,10,J,Q,K,A)
public String getDenomination(){}
// returns the String representation of the card ("A of Bearts")
public String toString(){}
// returns value is the value of the card number if the card
denomination is between 2 and 10:11 for J:12 for Q:13 for R:14 for A
public int getValue(){}
client program includes the following declarations:
string[] suits={"Clubs", "Diamonds", "Hearts", "Spades"};
string[] ranks={"2","3","4","5", "6", "7","8","9", "10", "J", "Q", "K", "A"};
ard[] deck = new Card[52];
ou will be writing code that appears in the client program.
(20 points) Write a nested loop that will fill deck by calling the Card constructor to crande
each of the 52 unique playing cards. Note, after the nested loop has been executed, dets
contains 52 unique playing cards.