Question: Hello, I have a Card class that includes name , suit and point of the card. then the CardDeck class, I am trying to create

Hello,

I have a Card class that includes name , suit and point of the card.

then the CardDeck class, I am trying to create and display the cards in a deck which has 52 cards.

To do this I created below arrays and using these arrays I want to assign these values to the deck array whose type is Card. How can I do this?

Thank you very much.

String[] nameitem = new String[] {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"};

String[] suititem = new String[]{"Spades", "Hearts", "Diamonds", "Clubs"};

int[] pointitem = new int []{ 1,2,3,4,5,6,7,8,9,10,10,10,10};

Card [] deck = new Card[52];

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!