Create and display all 52 cards in a standard deck of playing cards (2-10, J, K, Q, A of Hearts, Diamonds, Clubs, Spades). You MAY NOT have 52 lines that create the cards manually. Note: I am NOT asking you to store the 52 cards. I am only asking you to build them, and ask each one to display itself. Do not use an array for suits or rank (do not use array to creating card object) do not use something that is not mention in the teacher's record, which is in the web site below.
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);
}
}