ProcessTransactions

ProcessTransactions - /* / ProcessTransactions.java / / A...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************* // ProcessTransactions.java // // A class to process deposits and withdrawals for two bank // accounts for multiple days. //******************************************************* import java.util.Scanner; public class ProcessTransactions { public static void main(String[] args){ Account acct1, acct2; //two test accounts String keepGoing = "y"; //more transactions? String anotherDay = "y"; //go for another day? String action; //deposit or withdraw double amount; //how much to deposit or withdraw long acctNumber; //which account to access Scanner scan = new Scanner(System.in); //Create two accounts acct1 = new Account(1000, "Sue", 123); acct2 = new Account(1000, "Joe", 456); while (anotherDay.equalsIgnoreCase("y")) { System.out.println("The following accounts are available:\n"); acct1.printSummary(); System.out.println(); acct2.printSummary(); while (keepGoing.equalsIgnoreCase("y")) { //get account number, what to do, and amount System.out.print("\nEnter the number of the account you would
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ProcessTransactions - /* / ProcessTransactions.java / / A...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online