/*
Programming Assignment One, CSCI 221 from Dr. Sun

Please design and implement a Java class named BankAccount that supports the following operations:
1) to create an account with the account number (a string) and initial balance $0.0;
2) to deposit money;
3) to withdraw money;
4) to check balance;
5) to provide the account number;

Use the attached Main class to test your class. The results should look like:
    ----------------------------------------
    Balance in Account BA-123-001 is $0.0
    Balance in Account BA-654-002 is $0.0

    $100.0 is deposited to Account BA-123-001
    $500.25 is deposited to Account BA-654-002

    Low Balance. Operation is rejected.
    $40.0 is withdrawn from Account BA-654-002

    Balance in Account BA-123-001 is $100.0
    Balance in Account BA-654-002 is $460.25
    -----------------------------------------

Submit your source code as BankAccount.java to OAKS. Due by Thursday, Jan. 30th at 11:59pm. 
 */

public class Main {

    public static void main(String[] args) {

        //create two accounts
        BankAccount account1 = new BankAccount("BA-123-001");
        BankAccount account2 = new BankAccount("BA-654-002");

        //check balance
        System.out.println("Balance in Account " + account1.getAccountNumber() + " is $" + account1.getBalance());
        System.out.println("Balance in Account " + account2.getAccountNumber() + " is $" + account2.getBalance());
        System.out.println(); // print an empty line

        //deposit
        account1.deposit(100);
        account2.deposit(500.25);
        System.out.println(); // print an empty line

        //withdraw
        account1.withdraw(150);
        account2.withdraw(40);
        System.out.println(); // print an empty line

        //check balance again
        System.out.println("Balance in Account " + account1.getAccountNumber() + " is $" + account1.getBalance());
        System.out.println("Balance in Account " + account2.getAccountNumber() + " is $" + account2.getBalance());
        
    }
}