Out println 1 get another card system out println 2

This preview shows page 2 - 5 out of 6 pages.

System.out.println("1. Get another card");System.out.println("2. Hold hand");System.out.println("3. Print statistics");System.out.println("4. Exit");System.out.println(" ");System.out.println("Choose an option:");selection = userInput.nextInt();}if(selection ==1){cardNum = rng.nextInt(13) + 1;switch(cardNum){ //out prints the card number/typecase 1:System.out.println("Your card is a ACE!");playerHand = playerHand + 1;break;case 2:System.out.println("Your card is a 2!");playerHand = playerHand + 2;break;case 3:System.out.println("Your card is a 3!");
playerHand = playerHand + 3;break;case 4:System.out.println("Your card is a 4!");playerHand = playerHand + 4;break;case 5:System.out.println("Your card is a 5!");playerHand = playerHand + 5;break;case 6:System.out.println("Your card is a 6!");playerHand = playerHand + 6;break;case 7:System.out.println("Your card is a 7!");playerHand = playerHand + 7;break;case 8:System.out.println("Your card is a 8!");playerHand = playerHand + 8;break;case 9:System.out.println("Your card is a 9!");playerHand = playerHand + 9;break;case 10:System.out.println("Your card is a 10!");playerHand = playerHand + 10;break;case 11:System.out.println("Your card is a JACK!");playerHand = playerHand + 10;break;case 12:System.out.println("Your card is a QUEEN!");playerHand = playerHand + 10;break;case 13:System.out.println("Your card is a KING!");playerHand = playerHand + 10;
break;}System.out.println("Your hand is: "+ playerHand);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture