src/main/java/com/accenture/multibank/factory/SimpleAccountFactory.java
public AccountModifiable createAccount(AccountNumberGenerator generator, AccountType accountType,
			BigDecimal balance) throws OperationNotSupportedException {
		if (generator == null)
			throw new NullPointerException("Generator can't be null");
		if (accountType == null)
			throw new NullPointerException("Account type not specified");

		int accNum = generator.generateAccountNumber();
		AccountModifiable acc = null;

		switch (accountType) {
			case SAVING:
				acc = new SavingAccount(accNum, balance);
				break;
			case CREDIT:
				acc = new CreditAccount(accNum, balance);
				break;
			default:
				throw new OperationNotSupportedException("Account type not supported yet");
		}

		return acc;
	}
/**
	 * Creates an account with the account number generated by the given generator
	 * @param generator Generator wo be used to generate the account number
	 * @param accountType Type of the account
	 * @param balance Balance to be set on the account
	 * @return
	 */
Creates an account with the account number generated by the given generator
@param generator Generator wo be used to generate the account number
@param accountType Type of the account
@param balance Balance to be set on the account
@return
Creates an account with the account number generated by the given generator @param generator Generator wo be used to generate the account number @param accountType Type of the account @param balance Balance to be set on the account @return
public AccountModifiable createAccount(AccountNumberGenerator generator, AccountType accountType,
			BigDecimal balance) throws OperationNotSupportedException {
		if (generator == null)
			throw new NullPointerException("Generator can't be null");
		if (accountType == null)
			throw new NullPointerException("Account type not specified");
		int accNum = generator.generateAccountNumber();
		AccountModifiable acc = null;
		switch (accountType) {
			case SAVING:
				acc = new SavingAccount(accNum, balance);
				break;
			case CREDIT:
				acc = new CreditAccount(accNum, balance);
				break;
			default:
				throw new OperationNotSupportedException("Account type not supported yet");
		}
		return acc;
	}
public AccountModifiable createAccount ( AccountNumberGenerator generator , AccountType accountType , BigDecimal balance ) throws OperationNotSupportedException { if ( generator == null ) throw new NullPointerException ( "Generator can't be null" ) ; if ( accountType == null ) throw new NullPointerException ( "Account type not specified" ) ; int accNum = generator . generateAccountNumber ( ) ; AccountModifiable acc = null ; switch ( accountType ) { case SAVING : acc = new SavingAccount ( accNum , balance ) ; break ; case CREDIT : acc = new CreditAccount ( accNum , balance ) ; break ; default : throw new OperationNotSupportedException ( "Account type not supported yet" ) ; } return acc ; }
Creates an account with the account number generated by the given generator
 @param generator Generator wo be used to generate the account number
 @param accountType Type of the account
 @param balance Balance to be set on the account
 @return
Creates an account with the account number generated by the given generator @param generator Generator wo be used to generate the account number @param accountType Type of the account @param balance Balance to be set on the account @return