// Demonstrates use of BankAccount and NegativeAmountException 	
	
import java.util.*;	
	
public class Deposits {	
	// main(): application entry point 	
	public static void main(String[] args) 	
			throws NegativeAmountException {	
		Scanner stdin = new Scanner(System.in);	
	
		BankAccount savings = new BankAccount();	
	
		System.out.print("\nEnter first deposit: ");	
		int deposit = stdin.nextInt();	
		savings.addFunds(deposit);	
	
		System.out.print("\nEnter second deposit: ");	
		deposit = stdin.nextInt();	
		savings.addFunds(deposit);	
	
		System.out.println("\nClosing balance: "	
			+ savings.getBalance());	
	}	
}	
