Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public class CardsApp {
  2.  
  3. public static void main () {
  4.  
  5. Cards[] deck = new Cards[52];
  6. int cardCount = 0;
  7.  
  8. createCards("Hearts");
  9. createCards("Diamonds");
  10. createCards("Spades");
  11. createCards("Clubs");
  12. }
  13.  
  14.  
  15. public static void createCards (String suit) {
  16. for (int count = 1; count <= 13; count++) {
  17. deck[cardCount] = new Cards (suit, Integer.toString(count));
  18. cardCount++;
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement