In Java programming language what are the attributes of clas

In Java programming language what are the attributes of class named PlayingCard

Solution

Hi, Please find help from my side about attribiutes of PlayingCard class.

PlayingCard class can have following attributes:
   /*Collections of cards*/
private Card cards[];

/*Remaining number of cards in the deck*/
private int currentCount;

private Suit suits[];

private Value values[];

class PlayingCard{
   /*Collections of cards*/
private Card cards[];

/*Remaining number of cards in the deck*/
private int currentCount;

private Suit suits[];

private Value values[];


//////----------- other stuff -------------/////////////
}


/*This represents the suit of the card*/
private enum Suit{
CLUB,DIAMOND,SPADE,HEART
}

/* This represents the number of the card*/
private enum Value{
ACE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE,TEN,JACK,QUEEN,KING
}

/* This class represents the card with specific suit and value.
* Cannot change the value once instansiated */
private class Card{

private final Suit suit;

private final Value value;

public Card(Suit suit, Value value){
this.suit=suit;
this.value=value;
}


public Suit getSuit() {
return suit;
}

public Value getValue() {
return value;
}

public String toString() {
return suit+\"-\"+value;
}
}

In Java programming language what are the attributes of class named PlayingCardSolutionHi, Please find help from my side about attribiutes of PlayingCard class.
In Java programming language what are the attributes of class named PlayingCardSolutionHi, Please find help from my side about attribiutes of PlayingCard class.

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site