/**
 * This class will be an interface for bank workers.
 * 
 */

import java.util.Scanner;

public class Bank
{
    Scanner scan = new Scanner(System.in);
    private BankAccount[] allAccounts=new BankAccount[20];    
    /**
     * Constructor for objects of class Bank
     */
    public Bank()
    {
        System.out.println("WELCOME TO OUR BANK");
        String optionString=options();
        //creates new account
        while (!optionString.equals("g"))
        {
            if (optionString.equals("a"))
            {
                createAccount();
            }
            //selects individual account
            if (optionString.equals("b"))
            {
                selectAccount();
            }
            //consolidates accounts
            if (optionString.equals("c"))
            {
                consolidateAccounts();
            }
            //transfer funds
            if (optionString.equals("d"))
            {
                transferFunds();
            }
            //lists open accounts
            if (optionString.equals("e"))
            {
                listOpenAccounts();
            }
            //lists bank info
            if (optionString.equals("f"))
            {
                listBankInfo();
            }
        optionString=options();
        }

    }
    
    //This method displays the user options
    public String options ()
    {
        scan = new Scanner (System.in);
        System.out.println("Choose one\n"+
                            "a. create new account\n"+
                            "b. select individual account\n"+
                            "c. consolidate accounts\n"+
                            "d. transfer funds\n"+
                            "e. list open accounts\n"+
                            "f. list bank info\n"+
                            "g. exit");
        String optionString = scan.nextLine();
        return optionString;    
    }
    
    //If there is an available account (one that is null), it will read in username and balance and create a new account
    public void createAccount()
    {

    }
    
    //THIS IS THE TRICKY ONE - Display the accounts (listOpenAccounts) and read in the user which account they want to work on
    //Then ask if they would like to make a deposit or withdrawl or getbalance
    //Do what they ask     
    public void selectAccount()
    {
    
    }
    
    //If there are atleast 2 accounts and atleast one open account (one thats null) show the user the accounts (listOpenAccounts) and then
    //ask the user which accounts to consolidate.  Then consolidate them (creating a new accnt) telling them the new account info
    public void consolidateAccounts()
    {
 
    }
    
    //transfers funds If there are atleast 2 accounts 
    //ask the user which accounts to transfer money and then ask how much money.  
    //Then transfer the money    
    public void transferFunds()
    {

    }
    
    //this method lists the open bank accounts 
    public void listOpenAccounts()
    {
    }
    
    //this method will print all the bank info - how many accounts, how much money they hold
    public void listBankInfo()
    {
    }
	
	public static void main(String[] args) {
		Bank b=new Bank();
		
	}
}