Consider the DealHands code: import java.util.Scanner; import java.util.ArrayList; public class DealHands { public static void main(String[] args) { Deck D = new Deck(); System.out.println("A brand new, fresh deckn"+D); D.shuffle(); System.out.println("Shuffledn"+D); Scanner sc = new Scanner(System.in); int players; System.out.print("Enter number of players: "); players = sc.nextInt(); ArrayList<Hand> hands = new ArrayList<Hand>(players); for(int i=0;i<players;i++) { Hand h = new Hand(); hands.add(h); } for(int i=0;i<5;i++) { for(int j=0;j<players;j++) { Card C= D.dealCard(); hands.get(j).addCard(C); } } for(int i=0;i<hands.size();i++) { System.out.println(hands.get(i)); } System.out.println("nWhat remainsn"+D); } } Add these to the above code: "-now test error handling, nicely labelled... -try to create a bad card. ... -write a loop that deliberately tries to deal a card from the deck after it has been emptied".