I am trying to create a program that models a deck of playing cards using a class and an array. I do not want to hand set each card, so how can I use a for loop to set the values of all the cards and then display them like
Ace of Spades
2 of Spades
...
10 of Clubs
King of Clubs
and so on
Here is what I have so far but I can tell when I compile that the loop is not setting the array values.
Alright I've amended the program so that I can at least get one card to print, but I need to use a for loop to set the appropriate values of all the spaces in my array. I was thinking that I need to set values 0-12 as spades, 13-25 as hearts, 26-38 as diamonds, and 39-51 as clubs. How can I implement a for loop to set this?
Here's where I define the first element in the array: