public static JohnnyBank getJohnnyBank(int n) {
   switch (n) {
     case 0:
       return new JohnnyBank();
     case 1:
       JohnnyBank B1 = new JohnnyBank();
       B1.adjustToBalance(20000);
       B1.setPin(9903);
       B1.setTransactions(new JohnnyTransaction[3]);
       return B1;
     default:
       break;
   }
   throw new java.util.NoSuchElementException();
 }
  public static JohnnyMachine getJohnnyMachine(int n) {
    switch (n) {
      case 0:
        return new JohnnyMachine();
      case 1:
        JohnnyMachine J2 = new JohnnyMachine();
        JohnnyCard C2 = new JohnnyCard();
        C2.setJohnnyCardId(10000);

        JohnnyBank B2 = new JohnnyBank();
        B2.setBalance(200000);
        B2.setBankAccountId(10000);
        B2.initialiseJohnnyCard(C2);

        J2.setJohnnyBank(B2);
        J2.setJohnnyCard(C2);

        return J2;
      default:
        break;
    }
    throw new java.util.NoSuchElementException();
  }