/* CardProgram2.java CIS 160 David Klick 2016-11-01 Creates and shuffles a deck of cards, and then lets the user search for a card. */ public class CardProgram2 { public static void main(String[] args) { String[] cards = createDeck(); shuffle(cards); java.util.Scanner kbd = new java.util.Scanner(System.in); System.out.print("Enter the card you want (Enter to exit): "); String scard = kbd.nextLine(); while (scard.length() > 0) { int pos = find(cards, scard); if (pos != -1) { System.out.println("That card is at position " + (pos+1)); } else { System.out.println("That card was not found"); } System.out.print("Enter the card you want (Enter to exit): "); scard = kbd.nextLine(); } } private static int find(String[] cards, String scard) { int found = -1; for (int i=0; i