questiongenerate and display all 52 cards in a


Question

Generate and display all 52 cards in a standard deck of playing cards (2-10, J, K, Q, A of Hearts, Diamonds, Clubs, and Spades). You MAY NOT have 52 lines that generate the cards manually.

public class Card
{
//Fields
String suit;
String value;

//Constructors
Card(String suit, String value)
{
this.suit = suit;
this.value = value;
}

//method
void display()
{
System.out.println(this.value + " of " + this.suit);
}
}

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: questiongenerate and display all 52 cards in a
Reference No:- TGS0444666

Expected delivery within 24 Hours