Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class AccountTest
- {
- public static void main( String[] args )
- {
- Account account1 = new Account( 50.00 );
- Scanner input = new Scanner( System.in );
- double withdrawlAmount;
- System.out.printf( "account1 balance: $%.2f\n",
- account1.getBalance() );
- System.out.print( "Enter withdrawl amount for account1: " );
- withdrawlAmount = input.nextDouble();
- System.out.printf( "\nremoving %.2f from account1 balance\n\n",
- withdrawlAmount );
- account1.debit( withdrawlAmount );
- System.out.printf( "account1 balance: $%.2f\n",
- account1.getBalance() );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment