/*
	This demonstrate overloading of Atm class
	
*
*/

import java.util.*;

public class AtmOverloadDemo
{
	public static void main(String[] args)
	{
		Scanner key = new Scanner(System.in);
		
		double money;
		
		// Gets the user account starting balance
		
		System.out.println("Enter your starting balance ");
		money = key.nextDouble();
		
		/*
			 Creates an Atm object
			 Pass the balance into AtmOverload
			 Then assign money into balance
			
		*
		*/
			 
		AtmOverload atm = new AtmOverload(money);
		
		// Ask the user for desposit amount
		
		System.out.println("How much do you want to deposit");
		double damount = key.nextDouble();
		
		/*
			 Calls the deposit method in AtmOverload class
			 Passes damount into it
			 
		 *
		 */
		 	
		atm.deposit(damount);
		
		// Prints out the new amoun after deposit		
		System.out.println("Your new amount after deposit is " + atm.getBalance());
		
		// Ask the user for withdraw amount
		
		System.out.println("\nHow much do you want to withdraw");
		double wamount = key.nextDouble();
		
		/*
			 Calls the withdraw method in AtmOverload class
			 Passes wamount into it
			 
		 *
		 */
			
		
		atm.withdraw(wamount);
		
		// Prints out the new amount after withdraw
		
		System.out.println("Your new balance is " + atm.getBalance());
		
	}
}
		
		