From 537a90aec45fef0f57a31ba475f02c51e25b9c46 Mon Sep 17 00:00:00 2001 From: kendrang Date: Sat, 26 Oct 2019 09:58:18 -0400 Subject: [PATCH 01/16] add classes --- src/main/java/Account.java | 2 ++ src/main/java/Console.java | 2 ++ src/main/java/Transactions.java | 2 ++ src/main/java/User.java | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 src/main/java/Account.java create mode 100644 src/main/java/Console.java create mode 100644 src/main/java/Transactions.java create mode 100644 src/main/java/User.java diff --git a/src/main/java/Account.java b/src/main/java/Account.java new file mode 100644 index 0000000..e5142a8 --- /dev/null +++ b/src/main/java/Account.java @@ -0,0 +1,2 @@ +public class Account { +} diff --git a/src/main/java/Console.java b/src/main/java/Console.java new file mode 100644 index 0000000..d926ef5 --- /dev/null +++ b/src/main/java/Console.java @@ -0,0 +1,2 @@ +public class Console { +} diff --git a/src/main/java/Transactions.java b/src/main/java/Transactions.java new file mode 100644 index 0000000..4b69723 --- /dev/null +++ b/src/main/java/Transactions.java @@ -0,0 +1,2 @@ +public class Transactions { +} diff --git a/src/main/java/User.java b/src/main/java/User.java new file mode 100644 index 0000000..52dda73 --- /dev/null +++ b/src/main/java/User.java @@ -0,0 +1,2 @@ +public class User { +} From f9aa6396dcbc0029ac61292278c77cc4dc3315ed Mon Sep 17 00:00:00 2001 From: Kai Shields Date: Sat, 26 Oct 2019 14:02:31 -0400 Subject: [PATCH 02/16] added Users Skeleton --- src/main/java/Main.java | 2 +- src/main/java/User.java | 60 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 05e41a9..1dbc0cb 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -4,6 +4,6 @@ public class Main { public static void main(String[] args){ - + } } diff --git a/src/main/java/User.java b/src/main/java/User.java index 52dda73..aee962f 100644 --- a/src/main/java/User.java +++ b/src/main/java/User.java @@ -1,2 +1,62 @@ public class User { + private String firstName; + private String lastName; + private Integer pin; + private Double balance; + + public User() { + } + public User (String firstName, String lastName, Integer pin) { + setFirstName(firstName); + setLastName(lastName); + setPin(pin); + } + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName){ + if (firstName != null){ + this.firstName = firstName; + } + } + + + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + if (lastName != null){ + this.lastName = lastName; + } + } + + + public Integer getPin() { + return pin; + } + public void setPin(Integer pin) { + if (pin != null) { + this.pin = pin; + } + } + + + public Double getBalance() { + return balance; + } + public void setBalance(Double balance) { + if (balance >= 0) { + this.balance = balance; + } + } + public void addToBalance(Double amount){ + if (amount > 0){ + balance += amount; + } + } + public void subtractFromBalance(Double amount){ + if (amount > 0){ + balance -= amount; + } + } } From 1fece6616f1cc22c61788ea1f3d16f280077db3a Mon Sep 17 00:00:00 2001 From: Kai Shields Date: Sat, 26 Oct 2019 15:28:28 -0400 Subject: [PATCH 03/16] added balance method to User class --- src/main/java/User.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/User.java b/src/main/java/User.java index aee962f..73714d4 100644 --- a/src/main/java/User.java +++ b/src/main/java/User.java @@ -6,10 +6,11 @@ public class User { public User() { } - public User (String firstName, String lastName, Integer pin) { + public User (String firstName, String lastName, Integer pin, Double balance) { setFirstName(firstName); setLastName(lastName); setPin(pin); + setBalance(balance); } public String getFirstName() { return firstName; From c51e00f80bc7887dc238dd3a0c5be819559ed01e Mon Sep 17 00:00:00 2001 From: kendrang Date: Sat, 26 Oct 2019 15:51:21 -0400 Subject: [PATCH 04/16] did stuff in main --- src/main/java/Console.java | 30 ++++++++++++++++++++++++++++++ src/main/java/Main.java | 31 ++++++++++++++++++++++++++++++- src/main/java/User.java | 4 ++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/main/java/Console.java b/src/main/java/Console.java index d926ef5..229a44c 100644 --- a/src/main/java/Console.java +++ b/src/main/java/Console.java @@ -1,2 +1,32 @@ +import java.util.Scanner; + public class Console { + public static void print(String output, Object... args) { + System.out.printf(output, args); + } + + public static void println(String output, Object... args) { + print(output + "\n", args); + } + + public static String getStringInput(String prompt) { + Scanner scanner = new Scanner(System.in); + println(prompt); + String userInput = scanner.nextLine(); + return userInput; + } + + public static Integer getIntegerInput(String prompt) { + Scanner scanner = new Scanner(System.in); + println(prompt); + Integer userInput = scanner.nextInt(); + return userInput; + } + + public static Double getDoubleInput(String prompt) { + Scanner scanner = new Scanner(System.in); + println(prompt); + Double userInput = scanner.nextDouble(); + return userInput; + } } diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 05e41a9..3383302 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -4,6 +4,35 @@ public class Main { public static void main(String[] args){ - + + boolean turnOn = true; + + Console.println("Welcome to the ATM ! Would you like to make a new account or do you have an existing account?"); + double inputValue = Console.getIntegerInput("Choose: 1 or 2 \n 1. I have an existing account \n 2. I want to make a new Account\n" + + "3. Exit ATM " + ); + + int choice; + choice = Console.getIntegerInput(); + + switch(choice){ + case 1: + Console.println( "Welcome back! \n Please input your username: "); + + break; + case 2: + Console.println("Thank you for choosing our bank! Please input your first name:"); + + break; + case 3: + turnOn= false; + break; + + default: + Console.println("Error: invalid option"); + + break; + } + } } diff --git a/src/main/java/User.java b/src/main/java/User.java index 52dda73..2b11adf 100644 --- a/src/main/java/User.java +++ b/src/main/java/User.java @@ -1,2 +1,6 @@ public class User { + + + + } } From 38ebcc1d55c81800c6c3094b2994fc5adc401268 Mon Sep 17 00:00:00 2001 From: kendrang Date: Sat, 26 Oct 2019 17:34:03 -0400 Subject: [PATCH 05/16] worked on main functions more --- src/main/java/Main.java | 66 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 3383302..024280e 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,27 +1,76 @@ /** * Created by iyasuwatts on 10/17/17. */ + +import java.util.InputMismatchException; +import java.util.Scanner; + public class Main { public static void main(String[] args){ boolean turnOn = true; - Console.println("Welcome to the ATM ! Would you like to make a new account or do you have an existing account?"); - double inputValue = Console.getIntegerInput("Choose: 1 or 2 \n 1. I have an existing account \n 2. I want to make a new Account\n" + - "3. Exit ATM " + Console.println("Welcome to the ATM ! \n \n" + + "*** *** *** \n" + + "*** *** *** \n" + + "*** *** *** \n" + + "*** *** ***** *** *** *** \n" + + "*** *** ******* *** ******** \n" + + "*********** **** *** *** **** **** \n" + + "*********** *** *** *** *** *** \n" + + "*** *** ********* *** *** *** \n" + + "*** *** ********* *** *** *** \n" + + "*** *** *** *** *** *** \n" + + "*** *** **** *** **** *** \n" + + "*** *** ******** *** ******** \n" + + "*** *** ******* *** *** *** \n" + + " *** \n" + + " *** \n" + + " *** \n==========++=========" + + " \nWould you like to make a new account or do you have an existing account?"); + Integer inputValue = Console.getIntegerInput("Choose: an Option \n 1. I have an existing account \n 2. I want to make a new Account\n 3. Exit ATM " ); - int choice; - choice = Console.getIntegerInput(); - - switch(choice){ + switch(inputValue){ case 1: - Console.println( "Welcome back! \n Please input your username: "); + String usernameValue = Console.getStringInput( "Welcome back! \n Please input your username: "); + + +// if (pinNumValue== usernamePinNum ){ +// call the transaction methods here +// } + for(int i=1;i<=1000;i++) + { + try + { + Integer pinNumValue = Console.getIntegerInput( " Please input your four digit pin number: "); + if(pinNumValue<=9999 && pinNumValue>=1000) + { + } + else + { + System.out.println("Pin must be four digit"); + + } + + + } + catch(InputMismatchException e) + { + + System.out.println("Error use numbers not alphabets or characters"); + } + } + + break; case 2: Console.println("Thank you for choosing our bank! Please input your first name:"); + String firstName = Console.getStringInput("First name:"); + String lastName = Console.getStringInput("Last name:"); + System.out.println("Welcome " + firstName + " \n Your new username is :" + firstName+lastName ); break; case 3: @@ -35,4 +84,5 @@ public static void main(String[] args){ } } + } From c07b418ec5ba116835b3fda1ffb2670256ceffe3 Mon Sep 17 00:00:00 2001 From: Jack Harris Date: Sat, 26 Oct 2019 18:40:33 -0400 Subject: [PATCH 06/16] drafted account and transactions classes --- src/main/java/Account.java | 80 +++++++++++++++++++++ src/main/java/Transactions.java | 119 ++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) diff --git a/src/main/java/Account.java b/src/main/java/Account.java index e5142a8..8b4cc0e 100644 --- a/src/main/java/Account.java +++ b/src/main/java/Account.java @@ -1,2 +1,82 @@ +import java.util.ArrayList; + public class Account { + + /* + Things we need here: + 1. checking accounts + 2. savings accounts + 3. investment accounts + ***bins would probably be a good way to store this information - have a bin for each user with a slot for each account + + Things we may also need here? + 1. account balance - there's already a balance value in the User.java tab, but it might work better here because we need separate balances in each type of account + 2. account number + 3. BONUS - Persistence + - create a way to store user information, account balances, etc + - probably the best way if we get to this would be to save a current state of all account balances to a spreadsheet when we close the ATM app + - alternately, access the spreadsheet every time any transaction is completed, so that if the program crashes before closing all information is still saved + */ + + //establish all the data stored in the Account object: + //instances of Accounts should have name [firstLast] + private String firstName; + private String lastName; + private int pin; + private int chkAcctNum; + private int savAcctNum; + private int invAcctNum; + private double chkAcctBal; + private double savAcctBal; + private double invAcctBal; + private ArrayList transactionHistory = new ArrayList(); + + //actions that can be called to create a new account bin: + public Account(String firstName, String lastName, int pin){ + this.firstName = firstName; + this.lastName = lastName; + this.pin = pin; + } + + + //create getters for all the data stored in the Account object: + public String getFirstName() { + return firstName; + } + + public String getLastName() { + return lastName; + } + + public int getPin() { + return pin; + } + + public int getChkAcctNum() { + return chkAcctNum; + } + + public int getSavAcctNum() { + return savAcctNum; + } + + public int getInvAcctNum() { + return invAcctNum; + } + + public double getChkAcctBal() { + return chkAcctBal; + } + + public double getSavAcctBal() { + return savAcctBal; + } + + public double getInvAcctBal() { + return invAcctBal; + } + + + + } diff --git a/src/main/java/Transactions.java b/src/main/java/Transactions.java index 4b69723..da03dc7 100644 --- a/src/main/java/Transactions.java +++ b/src/main/java/Transactions.java @@ -1,2 +1,121 @@ public class Transactions { + /* + needed: + 1. Deposit to acct + 2. Withdraw from acct + 3. Transfer across accounts (self) + 4. Open new account + 5. Close account (must be empty) + 6. Print transaction history + 7. Check balance + *. Challenge: Transfer to another user's account (but not from) + */ + + //establish variables: + private double increment; //the amount to be changed + private String acctType; //the type of account being changed + private String acctType2; //used when a second account type is required, such as a transfer + + public void deposit(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //increase to the new balance + //set the new balance in the bin + //save to transaction history (append to list array) + } + + public void withdraw(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //ensure sufficient funds + //if sufficient + //decrease from the old balance + //set the new balance in the bin + //save to transaction history (append to list array) + //if insufficient + //"insufficient funds" message + + } + + public void transfer(double increment, String acctType, String acctType2){ + //pull the amount being changed + this.increment = increment; + //determine the origin account + this.acctType = acctType; + //determine the origin account + this.acctType = acctType; + //grab current balance for both accounts + //ensure sufficient funds + //if sufficient + //decrease from the origin balance + //set the new origin balance in the bin + //add to the destination balance + //set the new destination balance in the bin + //save both actions to transaction history (append to list array) + //if insufficient + //"insufficient funds" message + } + +/* ignore this one - account will be created in account class + public void newAccount(String firstName, String lastName, int pin){ + //create a new account bin containing the first three integers + this.firstName = firstName; + this.lastName = lastName; + this.pin = pin; + //then fill the remainder of the bin with default values + } +*/ + + public void closeAccount(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //increase to the new balance + //set the new balance in the bin + //save to transaction history (append to list array) + } + + public void currentBalance(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //increase to the new balance + //set the new balance in the bin + //save to transaction history (append to list array) + } + + public void transactionHistory(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //increase to the new balance + //set the new balance in the bin + //save to transaction history (append to list array) + } + + /* --------------------CHALLENGE------------------------ + public void transferOtherUser(double increment, String acctType){ + //pull the amount being changed + this.increment = increment; + //determine which account + this.acctType = acctType; + //grab current balance + //increase to the new balance + //set the new balance in the bin + //save to transaction history (append to list array) + } + -----------------------CHALLENGE---------------------*/ + } From e5a05258e1f7f3b1713ae258aa9bd43b1f3ed4e7 Mon Sep 17 00:00:00 2001 From: Jack Harris Date: Sat, 26 Oct 2019 18:59:47 -0400 Subject: [PATCH 07/16] added a couple comments and changed a bit of formatting --- src/main/java/Transactions.java | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/main/java/Transactions.java b/src/main/java/Transactions.java index da03dc7..3b57cb8 100644 --- a/src/main/java/Transactions.java +++ b/src/main/java/Transactions.java @@ -24,7 +24,9 @@ public void deposit(double increment, String acctType){ //grab current balance //increase to the new balance //set the new balance in the bin - //save to transaction history (append to list array) + //new balance = old balance + increment; + //or //balance += increment; + //save to transaction history (append to array list) } public void withdraw(double increment, String acctType){ @@ -37,7 +39,7 @@ public void withdraw(double increment, String acctType){ //if sufficient //decrease from the old balance //set the new balance in the bin - //save to transaction history (append to list array) + //save to transaction history (append to array list) //if insufficient //"insufficient funds" message @@ -57,7 +59,7 @@ public void transfer(double increment, String acctType, String acctType2){ //set the new origin balance in the bin //add to the destination balance //set the new destination balance in the bin - //save both actions to transaction history (append to list array) + //save both actions to transaction history (append to array list) //if insufficient //"insufficient funds" message } @@ -80,9 +82,10 @@ public void closeAccount(double increment, String acctType){ //grab current balance //increase to the new balance //set the new balance in the bin - //save to transaction history (append to list array) + //save to transaction history (append to array list) } +/* -------UNNECESSARY, JUST USE THE GETTER--------------------------- public void currentBalance(double increment, String acctType){ //pull the amount being changed this.increment = increment; @@ -91,8 +94,9 @@ public void currentBalance(double increment, String acctType){ //grab current balance //increase to the new balance //set the new balance in the bin - //save to transaction history (append to list array) + //save to transaction history (append to array list) } +*/ public void transactionHistory(double increment, String acctType){ //pull the amount being changed @@ -102,19 +106,11 @@ public void transactionHistory(double increment, String acctType){ //grab current balance //increase to the new balance //set the new balance in the bin - //save to transaction history (append to list array) + //save to transaction history (append to array list) } /* --------------------CHALLENGE------------------------ - public void transferOtherUser(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //increase to the new balance - //set the new balance in the bin - //save to transaction history (append to list array) + public void transferOtherUser(double increment, String acctType, String acctType2, user2){ } -----------------------CHALLENGE---------------------*/ From c2db134604991c876e3a5f7bee9600500fded31b Mon Sep 17 00:00:00 2001 From: Jack Harris Date: Sun, 27 Oct 2019 10:56:19 -0400 Subject: [PATCH 08/16] added the ascii art --- ASCII Art | 312 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 312 insertions(+) create mode 100644 ASCII Art diff --git a/ASCII Art b/ASCII Art new file mode 100644 index 0000000..04dd4fa --- /dev/null +++ b/ASCII Art @@ -0,0 +1,312 @@ +Roberto + +****************************(%%%%%&&&&&&&%(//******************************,*** +***********************/(%&&&@&@&&&&@@&&&&@&&&&@(****************************** +*//**************,*(%&&&&&@&&&&@&&&&&@@@@@@@@@@@&&%@&/***********************,* +(/*/***********/%&&&&@&&&&&&&&@@@@@@@@@@@@@@@@@@@@@&@@@@%********************** +*/(//********#&&&@@&@@&&&&&&%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%******************* +****(/*****/&&&@&&@&@&&&@@@@@&&%%%%%&&%%%%%%%&&&&&@&@@@@@@@@@(***************** +******(///(&&&&&@@&&&&&%%#((/////////*******////((###%&@@@@@@@#**************** +*******/((&&@@&&&&&%%(//*************************////((%&@@@@@@#*************** +*********%&&@@@#(/***,,,,,,,,,,,,,,,****************//(#&@@@@@&/************* +********#%&@&&(/***,,,,,,,,,,,,,,,,,,,,,,,*,,************/(%@@@@@@&************ +*//****(&&&&%(*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*********//#&@@@@@@%*********** +///***/&&@&%(/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**********/(%@@@@@@@/******,*** +//////%&@&%#/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*********/(#&&@@@@@&********** +/////(@&&(*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*********//#%&&@@@@@/********* +/////#&&%#(/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**********/(%%&%@@@@%********* +/////&&(/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*********//(#%&&&@@@/******** +**///%%%((/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*********////(##&&@@@#******** +****(%%#((*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*************//////(#%&&&@%*/****** +****(%###/*,,,,,*///(%%#####(*,,....,..,,,/(###%%%%%#//(////////#%%&&@&******** +****(%###*,,,*//(((#(((/////***,,,.,,,,,,**//////(((#((((##(////(%%&&@%******** +/*//(%##(*,,//**//**********,,,,,,,,,,,,*****/*******//(((#%(///(%%&&&%******** +****(%##(,,*/**,,,,,,**********,,,,,,,***///////////**//////((///%&&@&%/////*** +****(%##/,,*,,,,,,*******//(//**,,,,,,*////(((/((%#(//((/////////#&&&%////(///* +****/#%#/,,,,,**/**#&@@%@%((///**,,,,**////(#(*&&(@&(#&(//*////(&@#////**/*** +***,,/%%*,,,,,**(#(((###(/((((***,,,,**/////////////**/////***///(%&//********* +(***,,(%**,,,,,**,,,,,,,********,,,,***/////**////*************//(#&(//******** +/**,,*/#**,,,,,,,*****/****,,,,,,,,,,**/*//********************/(/#&/*,,,,*/*** +*/,,,,#(**,,,,,,,,,***,,,,,,,,,,,,,,,*///********,****,,,*****//((#&(*,,,**/*** +/*,,,,((**,,,,,,,,,,,,,,,,,,,,,,,,,,,,*///*****,*,,,,,,,,*****///((&/***/*/**** +**,*,,/#*,,,,,,,,,,,,,,,,,,,,**,,,,,,,,**/////*,,,,,,,,,,,***////((*//*/***** +//,**,/#*,,,,,,,,,,,,,,,,***,,,,,,,..,,******//**,,,,,,,,,***////(#@%//***/**** +*/****(%*,,,,,,,,,,,,,,*****,,,,,,,,***//(/////*******,,****/////(#@&/****(**** +***,,,/%/***,,,,*,,,****,,,**//*****/((///(((//************////((#&@&////(/**** +/*/,,,(%(*****,****/*****///(#%%%#/////##&&%%###(#((((((///////((%&@(##(***** +/*/(,,(&%*********(#####%&%&&&%%%%&%%%&%&&&&@@&&&&&&&&%%#/////((#&@@&&%#/****** +***(#(#&&(*******(#%%%%%%%%%&%%%%%%&&&%&%&&@&%&&&&&&&&((/((#%&@@&((((/////* +****/(#%%%(*****(%%&&&&&&&&&&%%&%((#(#%#%%##%##%&&&@@@@&((((#%&&@@&((((////// +****//(%&%%(**//#%%&&&&&(####(//***,,*...,,/((##((#&&&&&%%##(#%&&@&@%/((((///// +*****/(&&&%#(//#%%%&&&(////*****/****/////(((//((%&&@&&&&%&&@@@@%///((((/(( +*****//%&&&%%###%%%&&&%%#(///*****/******//(////((#%@&&&&&&&%%&@@@@@#/*///((((/ +*//**//#&@&&%%&%%%&&@@&%%((/((/((((#(((######(###%%%&@&@@@@&@&&@@@@@#/***/*/((( +****/*/%&@@@&&&&@@&&@@&&%%%%&%%&%%&&&@@@@@%%%%&&%%&&@@@@@@@@@@@@@@@&(/*****/*(( +****///#%@@@@&@&@@@@@@@&&&&&&&&&&@@@@&@@&&%%%@@@&@@@@@@@@@@@@@@@@@&%/********// +***/**/(#&&@@@@@@@@@@@@@@@&&&&&&&&@@@&@&&%&&&&&@@@&@@@@@@@@@@@@@@@%(*********** +/*/***//(%%@@@@@@@@@@@@@&@@@&&&&%##%%&&%&%(&&&@&@@@@@@@@@@@@@@@@@%(/*//******** +****/***/#%&&@@@@@@@@@@@@@@&&&&&&%%#%%&&&%@&&&@&@@@@@@@@@@@@@(//*****////** +*/*//***//#&@@@@@@&&@@@@@@@@@&&@%&%%#%#&%%&&&&@@@@&@@@@@@@@@@@@%((//****///***/ +/*****//**#&&&&&&&@@@@@@@&@@&&&&&&@&@&&&@&&@@@&@@@@@@@@@@@@@@@&(((**/////***//* +////******(#%%&@@@@&@@@@@@@@&&@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@%(//(%@@@#/***//** +*******///*(#*#@@@@@@@@@@@&@@&@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@%(///((((//&@#///*/ +**/***/&@@@&*,,*/&&@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(//*///(////(&@@@@@% +//#&@@@@@@@/*,,,,/(%@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@&%(/***///(//*/(@@@@@@@ +@@@@@@@@@@@/*,,,,,,,/#&&&@@@&@@@@@@@@@@@@@@@@@@@@@@@@&%(********///(/**#@@@@@@@ +@@@@@@@@@@@/*,,,,.,,,,/(((#&&@@@@@@@@@@@@@@@@@@@@@@%(/**********/////*/@@@@@@@@ +@@@@@@@@@@@%*,,,,,,..,,,,,**(#%%%%&&@@@@@@@&%&&%(*************//////&@@@@@@@@ +@@@@@@@@@@@@/,,,,,...,..,,,,,******(%&&@&%%#/(///*****,***********/**@@@@@@@@@@ +@@@@@@@@@@@@@/,...........,,,,,,,***(((((//*********,,*************/@@@@@@@@@@@ +@@@@@@@@@@@@@@#,,.......,,,,.,,,,,,****************,,,,***********%@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@*,.......,,,,,,,,,,,,,,,,**,*******,,,,,,,*****,(@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@&*,,.,,,,,,,,,,,,,,,,,,,********,*,,,,,,,,,,,*&@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@&*,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,,*%@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@#*,,,,,,,,,,,,,,,,,,,****,,,,,,,,,,,/&@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@#/*,,,,,,,,,,,,**,,,,,,,,,,,,,*%@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%(****************,,,,/#@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&%####%%%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + +Kris + ... ,,.......** .*,,**///*,.. ..,,,,,.,,,***//***, ....... .... .,,..,,. ,,**,,,*. + ....,,...***,,,,**,,,,...,. ,,....... . ..,,,........**, .,..,... + ..... .,**..,,*******,,,. .. . ..,.. ...... .. ., + ,,. .,**.,*,,,..,, .. ... ...,,..,***,..,,..,........... + .,,,*******,,,**, ....... ........ ... .,**,*.....***,.,**. ,*,,.... + .,.,...,,...,. ..............,,,,,,,,.... .,/*..,,*/(/,,**,*/**..,****..,. . + ........ ............................... .,//,. */(/,,*,,,,,,,.,,***,.... + .,,,*, . .. ...... ......,,.............,,,,,,.. .,,,,,.***/* ,*,..,,..,,*,,,,,.... + ...,,,**,, .... ............,,,,,,,,,,,*******,,,,,,,. ,*,,///(/*,. ...,,,,.,*/***,,...,,...,, + ,,***,.... ...............,,,,,,,,,,,,***********,,,,,,,,. ,*((//(/*,, .. *///////*,,,,,*,.,,. + ..**,******. .......,,,,,,,,******,,,,******////****,,,,,..,... .*((**//*//****,,,,***(((/**,*******,..,... + .,**,.,**** ....,,,,****************//////////*********,,,,.,.. .//////(((/*,,**,,*((//(////(/**,/*,***,.. + .,,*,,**,. ..,***********/////////((((//////***********,,,.,,.. ,,,,,*////*** .*/(/**///*/((/*///**//*,,, + ,,,,,,*. ..,**********///////////////////////////*******,,,,,.. .,*...**(/.,.. .,*/////,,/((/////***,,.. + ...,,,,,. ...,*///********///////////////((////////*********,,,.. ...,///,,..,...,/(/////(/**//(/*,. . + ...,**.. ..,**//******//////////////////////////***********,,,,. ,,.,..*((//**..,,.,*((((**(/,,,,*,... +,. . ...,,,, .,,**/*****/////////////////////////************,,,,,,,.. ,,,,,.,*/#(**,*,.. ,*/*,,,,. ..,,.. +**,.,, .... .,,********////////////////////////*************,,,,,,.,.. .,*//..**,,,,.,,....... . ....,,*/,. +/*,,..... .,,,,, ..,********///////////////***//////////*********,,,,,,,... ..,,,,.,*...,*,. .....,,. ,,,,,*//.. +*//***...,,,,,***,. ..,,,*****////////////*******///////(/////(///////**,..... ,* .. .,*,**.,*..,,,**,*..****,.,* +,*//..*,. .,***,... ..,,,*****///////////*////////((((((((##########(((//*,... .*, .. .,*. ....*,..*//,,*****,,, +,,,,..**,,,,,,,..** ..,,,*****//*//////////((((((((#######%%%%%#######((##/*...**,**, .. ,..,,**//*//***,. .,*/ +.. .,,**,..,***, ....,********/**///((((############%%%%%&&&&&&&%%%%%#(/*,..,*,,//***,...... .,.......... ,*// + . .. . ...,***,,,. ....,,,*******////((################%&&&&&&%%%%##(((/******.,**,..*//*,**,. .,,*, ..,.,*. ,/ +*/(/,,.,*,,. ,**,,**,. ...,,******//(((#####%%%%&&%#((//(#%%%%%%%######(********,.,,*//****//*,,,..,** ......,,,,.., +,*//.. .,//**,,*,,,,......,,******///((##&&&&&&&&&%%((////((########(//**********,.,,//**/*//,,,,.,*..,,,,,..,***,*//. +,***,,.... ..,*..,,,***,,,,,***////(%%%%%%%%%%%%%##((/////((((((((////////******,...,*****,.,,,..,..,*/(/**,,.,*,.,,,* + .//*/,. .,. .. ..,*((,,****/(###(((((###%%###(((//****//((###(((///((((//****,.,,. *(/*,.. .*/**((*,,,.,,,, ... +*,... .,,, ./(,,,,**/////((######(((((/////**,***////#%%%#######((/**/*,. ...***,,. ,//*/(/*,. ..,...,, +,,*,..... .... ....,/**,,****////////////(((((((//**********/(&&%%%%%####((///*,. ...,,*//**,,*/(///*,,*,***//* +*,..,, .. .. ,, ....,*/(,,**//////////////(((#(/////////////((#%%%%%%%%%###(////*.. .. ,///**/(///,,,*//,**, +..,, . .,.. .....*//**..//*,***///////////(((#%%(/////((####%%%%%%%%%%%%%%####(((//,.. .,. ... .*/*,//(((////##(*.. +(/.. ,,.,//* ..,*/*******,,****///////(((##%%%%#(((#######%%%%%###%%%%&%%######((/,.,..,*//,..,/,,*//*,*/(((##(((/*, +((*/*,*/*,*/*,,.,*/*,,*/((***********//((((##%%%%%###%%%%%%%%%%%###%%&&&&&%%#######((*,....***,. ..,**////**/,,**/(/**/ +%%####**/(/((/***///((#####/******/***/((###%%%%%#########%%%%%%%%%%%@@&&########((,.***,,,... ,,**(((#(//*,.******, +(#%#((((((((((//(%########%&(****///**/((##%%%%%##((########%#######%&%%%%##(((####(/*, .,..... .,*/***,.*/,.... +###(//(///((//*/(#((((######(//**///////(##%%%&&&&&&%#(#(((((((###%%##########(####(/((. +%%#(((//**(#(((((/*/((//(((((#(/**/////(((##%%&&&&&&&%#(#####%###(((((##(((###(###(//#%, +%%((((//*.*//...,/*,,(####/,/(#(***////((((###%%%%##(((((((((####(((((((((((######(//%&*. ... +###(((///,.***,,..,....,/##(/(%%(/**//(((((((#%%##((((((((#######((((((((///((##((/(#&&*..... +#(////,. .. ....., .,((##%%%%***//((((((####(((((((((((((((((((((((////((#((((#%&&*. .. .... +,,,***.. .,, .***,...,/##%%%%(/**///(((((##((((((((((((((//////////////((((((#%&&%*. .. .... +,,(((/,...,,,*, ..,***///((((##%%#*,**//(((((((((((((///(((////////////////(#((((%&&,. ........ +..*, ...,*/*,,,..,***. */**(###, ,*////(((((((/////(((((//(((//////((((((#(((#&&&,. ................ + ...,,.,,, .*//,***..,*/(/.. .,. ..*////((((((//////(((((((((((#######(######%&&((#(*...,.................. +*,..*///,,***,,***,.,,,,**//. ..,//////(((((//////((((((#################%%&&/(#(*.,,,...,,,............. +,. .,*//((/,,..******,,,.. ......,/#(//////((((//(((((##################%%%&%#(/*/,,,,,,,....................... +,,......*/..*##(/,*/*,,, ..,..,,(%#(//////(((((((((################%%&(((/,,,,,,,,,.....................,, +****,,..//,*(#(####/, ..............,*#%%#((((((((((((#################%%(((/**,****,,...................,,,** +(**(#(../(##%%#%%, ..... ....,,...,,*#%&%#(((((((((((((((#########%%&(((/*******,,.................,,****** +%%%#%%##//#%%#(. ...................,,,.,,,**#%&&%%##(((((###########%%&&&&(////******,,................,,****//// +#%%%#######/* .............,,,,,.....,,*,.,,*((#%&&&&&%%%%%%##%%%%%%&&&&&%#//***////*,,...............,,,********* +%%%##%%%#(. . ........,,,,,,,,,,,,***(%&%#(//#%&&&&&&&&&&&&&&&&&&&&(//**////**,,............,,,,,,,,,,,,,,,, +##%#%&%(. ................,,,,,,*****/(%&&%(/**/((#%&&&&&&&&&&&&&%(/**/////*,,,........,,,,,,,,,,,.......... +(/(%&%*. ..............,,,,,,****/((%%%%((/////(#####%%%&&&&(/*/((///*,,,,,,,,,,,,,,,,*******,,........ +((((*. ......... .........,,,,,,***////(###############(((#%#/*/(((//*****************************,,.... +##/, ......,,,,,..................,,,,,***////(((((((((#########//////((/////////////////////////////////**** +/* ...........,,,,,,,,,,.............,,,,***////////////////(((/**////((///////////////////////////////////// +. ................,,,,,,,,,,,,,,,,,,,,,,,,,,,********//////////////*//////////////***********************////// + +Chris +(((((////////////////////////////////////***********************////////*. .................................... +((((//////////////////////////////////***********************************. .............................. +####((((((/////////////////////////**************************************. .................. +(((((((((((((((((((////////////////**************************************. .,,,... .......... +///////////////////////////////////////////****************************** .,**//(((((((//**,,... +///////////////////////////////////////////////////////*********////*****. .......,,,,,,***//((((((//*,,,.. +/////////////////////////////****************/////////////((/////////////*.. ....................,,,,***//((((((// +////////////////////////***************************/(((((////******************. ..............................,,,,,,, +/////////////////////***************************/((#((((///////****,,,,,,.,,,***/*,............................,,,,,,,, +/////////////////////*************************(##((((///////////***,,,........,,,***,......................,...,,,,,,,, +//////////////////////**********************(##((((((////////////**,,............,,***..........................,,,,,,, +((((((((((//////////////******************/###(((((((////////////**,,,,.............,,**,,,,,,,,..........,,,,,,,,,,,,, +///////////////////////////////////////*/(#########((((//////////***,,,,,.....,,.....,,**,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +///////////////////*********////////////%%%##########((((((/////***,,,,,,,,,,,,,,,,,,,,,*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +/////////////////**********************#%%%%##%%%####(((((((/////**,,,,,,,,,,,,,,,,,,,,,***,,,,,,,,,,,,,,,,,,,,,,,,,,,* +//////////////************************(%%%%%%%%%%#%##((((////////**,,,,,,,,,,,,,,,,,,,,****,.,,,,,,,,,,,,,,,,,,,,,,,*** +//////////////***********************(%%%%%%%########(((#%&&&%%#((//**,,,,,,,,,,,,,,,,,,****......,,,,,,,,,,,,,,,,,,,,, +/////////////************************#&&&&&%%########%%&&&&%%%%&&&%#(/***,,,*,,,.,,..,,,,***..............,,,,,,,,,,,,, +///////////////*********************/%&&&&&%%%#####%%&((//////(%%%%%#((/*****,,,,,,.,,,***,.......................... +///////////////////*****************(&&@@@@&&%%####%%######((((/((###(((((/*******,**,,,,****.. +(((((((///////////////////////****//(%&&&&&%%%###%%&&&&&&(((//((((###((//******/((#######(/,...... +/////////////////////////////////(&&&((&&&%%##((((((#%%&&%%%%%#####(((((((////////(((#%%##%%%(........... .. +/////////////////***************/####%%&&%%#(((///////((#(####(#((##((///**/***/((####((//*/(#,........................ +////////////***/***************/(((((#%&%%##((//////***//***////////**,,,*//,,,/#%(##((((/////......................... +////////////*******************/(((/#%%&%%##((/////*******,,,,,,,,,,...,*((*..,*#((#%%#((((*,,**,,,,,,,,,,,,,,,,,,,,,,. +//////////////******************/(////(%%###((////*********//*,,....,,,,*/*,,..,/,.**//////*..,,,/*,,,,,*************** +//////////////*//***************//(//(#&%%%#(((/////****,,,....,,*//(((*,*,,..........,,***,,,,**((*,,,**************** +////////////////*****************(/((#%&%%%##((/////****,,,,......,*//*,,,*,......,.......,,,,*,****,,,*********,,,**** +/////////////////***************/&%#(%&&&%%%##(((/////*****,,,,,,,,/((///((//****,,***,....,//******,,,**************,, +((((////////////////////////////#&&&&@@&&&&%%##((((///////*****,,,,*(#%%%&@##(%%(*,,...,,,***,,**,,,,,*************** +////////////////////**********/#%%%%&@@&&&&&%%###(((/////////****,,,**/(####%%%%%%(,,,......,******,,,,,*************** +//////////////////***********/%@@%%%%@@&&&&&%%####(((((///////((((((((###%%#(#%#(*,,,,,,,,,,,,*****,,,,,,**********,,,, +/////////////////**********/%&@@@@%%%@@&&&&&&&%%%###((((///###&&&%%#(////****///##(*,,*****,,,,,,,,,,,,,,,,,,,,,,,,,,,, +/////////////////********/(&@@@@@@&%%@@@&&&&&&&%%####((///(#%%&&&&%%%%%##((/////*/###(/*/*****,,,,,,,,,,,,,,,,,,,,,,,,, +/////////////////*******/%&@@@@@@@@@&@@@@&&&&&&&&%%%##((///###(((////**,,,*/(((#((#&%#(////***,,,,,,,,,,,************** +//////////////////////*/#&&@@@@@@@@@@@@@@@@@@&&&&%%%%%%#####(/**///(((/***,,,..,/#&&&%((////*******,,,,,,************** +///////////////////////(%&&@@@@@@@@@@@@@@@@@@@@&&&&&&&&%%%%%#///**///((##%##(/****/#%#////((*************/***////////// +////////////////////%&&@@&&@@@@@@@@@@@@@@@@@@@@@@@&&&&&%%%&%%#/////*/////((((((/***(#(((###(((((####((########%%%%##### +(((((((/////////(#%&&@@@@&&&&@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&&&%%#(///*************//#####%%%%%%%%%&&&%%%%%&&&&&&@&&%%%%% +//////////////%&&&&&&&@@@&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@&&&&%%%#(((////*/******//##%%%%((((((((#%&&%%%%%&&&&&&&&%#(/// +///////////(#&&&&@@@&&&@@&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@&&&%%%%%####(((((////(##%%%%(/////////(%&&%%%%%&&&&&&&&(((( +////////(%&&&&@&&&&&@@@@@@&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&%%%%%%%%###(#%%%%%#(///////////(%&&%%%%%&&&&&&&&&%(((# +/////(#&&&&@@@@&&&&&&&&@@@&&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&&&&&&&&&&&%(,**///////////(%&&&%%%%&&&&&&&&&%#### +//((&&&&&&@@@@@@&&&&&&&&&@@&&&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&/ */((((#######%%&&%%#######%%&&%#(((( +%&@@@@&&&&&&&&&&&&&&&&&&&@@&&&&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&%&%/////****/((#%%%%%#((((((((##%%%#((## +@@@@@@&&&&&&&&&&&&&&&&@@@@@&&&&&&&&&&&&&@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@&&&@@&%%&&%(/////(####%%%&%######%#%%&&&%%%%% +@@@@@@&&&&&&&&&&&&&&&&@@@@@&&&&&&&&&&&&&&@@@@@@@@&&&@@@@@@@@@@@@@@@@@@@&&&&&&&@@@@&%%@&%%%%%%%%%%%&&%%###%%%%%%&&&%%%&& +@@@@@@@@&&&&&&&&&&&&&&&&&@@@&&&&&&&&&&&&&&@@@@@@@@&&&&&&&&@@@@@@@@&&&&@&&@&&&&&@@@@@@&@&%########%%%#########%%%&&%%%%& +@@@@@@@@&&&&&&&&&&&&&&&&&&&@@@&&&&&&&&&&&&&@@@@@@@@@&&&&&&&&&%%%%%%%@@@%&@&&&&&@@&@@@@@&&%#((((((##%#(((((#####%&&%#%%% +@@@&@@@&&&&@@@&&&@@&&&&&&&&&@@&&&&&&&&&&&&&&&@@@@@@&&&&&%%%%%%%%%%%&@@##%@@@&&&&@@&&&&@@@&&&%%%%%%%%%%###%%%%%%%&&%%%%% +@@@@@@&&&&&&&@@&@@@&&&&&&&&&@@&&&&&&&&&&&&&&&&@@@@@@&&%&&%%%%%%%%%%######&@@&&&&&@&&&&&&&&&&%%%%%%%&%%####%%%%%&&&&&&&& +@@@@@&@@@&&&&&&&&@@@&&&&&&@@@@@&&&&&&&&&&&&&&&@@@@@@@&&%&&&%%%%#######(%#%@@@&&&&&@&&&&%%&&&%%%%%%%&%####%%%%%&&@@@@@@@ +@@@@@&&&&&&&&@&&&&&@@@&&&&&@@@@&&&&&&&&&&&&&&&&&&&@@@@&&%%%%%%%%%%###((###&@@@&&&&&&%%&&&&%%&&%&%%%&%%%%%%%%%%%%&&%%%%% +@@@@@@@@&&&@@&&&&&&&@@@&&&&@@@@&&&&&&&&&@@@@@@@@@@&&@@@&&%######((((((((###&@@@&&&&@&%%&&&&&%%%&%%%%##((((###(((((((((( +@@@@@&@@@&@&&&&&&&&&&&@@&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&%#%#%%%####(((((###@@@&&&&&&%%%&&&&&&%%%%#(((///(((((((((((((( +@@@@@@@@@@&&&&&&&&&&&&&&@&&&@@@@@@@@&&&@@@@@&@@@@@@@&&&&@&%#%%######(((((####@@@&&&&&&%%&&&&&&&&%%%((////(((((((((((((( +@@@@@@@@@@@@@&&&&&&&&&&&&&&&&&&&&@@@@&&&@@@@&&@@@@@@&&&&&@#%%#####((((((###&@@@&&&&&&%%&&&&&&&&&((///(((((((((((((( +@@@@@@@@@&@@@@@@&&&&&&&&&&&&&&&&&&&@@&&&&&@@@@&@@@@@@&&&&&@&%#%%#####(((((####&@@@&&&&&%%&&&&&&%&&&%((((((((((((((((((( +@@@@@@@@@@@@@@@@@@@@&&&&&&&&&&&&&&&&&@@&&&&@@@@&@@&&@&&&&&&&&%%%%%###(((((#####&@@@&&&&&%%&&&&&&&&&(((((((((((((((### + +Dolio +////////****////////////(////////////////////////////(/#%&@&&&&&&&&&&&&&&@&&&&%&%(//////////////////(((((////////////// +////////****////////////(//////////////////////////(##&&&&&&&&&&&&&&&@@@&&&@&@@@&&%/////////////////(((((////////////// +////////****//////////////////////////////////////#%&&&&&&&&&&&&&&@&&&&@@@@@@@@@&&&(//////////////(((((////////////// +////////****//////////////////////////////////(#&&&&&&@&&&&&&&&&&&&&&&&&@@&&@&&&@@&@&&%#//////((((/((((((////////////// +////////****////////////////////////////////(#&&&&&&&&&&&%%%%%%%%%%%&&&&&%&&%%&&&@@@@&@&%%%(///////((((((////////////// +////////****////////////(//////////////////#&&&&&&&&%%%############%%%%%%%%%%%%%%%%&&&@@&&#(/////(((((/////////////// +////////****///////////((/////////////////#&&%#%&&%###(((#((######%%%%%%%%%%%%%%%%%%%%&&@@@&%#/(//((((((/////////////// +////////****//////////(//////////////////(%#########(((((((((#####%%%%%%%%%%%%%%%%%%%%%%&&@@%%(///((((((/////////////// +////////****//////////(((////////////////#%#######((((((#((((#####%%%%%%%%%%%%%%%%%%%%##%%&@&%#((/((((((/////////////// +////////****//////////(/////////////////(%##%####((((((((((#######%%%%%%%%%%%%%%%%%%%%####%%&&%((/((((((//////////////* +////////****////////////(///////////////####(((((((((((((((#####%%%%%%%%%%%%%%%%%%%%%%%#####%&/((((((///////////////* +////////**,*/(///////*//////////////////##((((/((((((((((((#####%%%%%%%%%%%%%%%%%%%%%####%###&&%(((((((///////////////* +////////**,*/(/**//,////(//////////////((//(/(/////((((((#######%%%%%%%%%%%%%%%%%%%%%%########(((((////////////////** +////////*,,*//**//*///(////////////////(///////////((((#########%#%%%%%%%%%%%%%%%%%#%#########%#(((((////////////////** +////////*,,*/(*///////////////////////(/*//*////////(((########%#%%%%%%%%%%%%%%%%%%###########%#((((((((/////////////** +////////*,,*/(/////////(((/////////////**/**/***/////(((#########%%%%%%%%%%%%%%%%%%#############/(((((((////////////*** +//////***,,,*/*****/////*/*//****//////***///**///////########%%%%%%%%%%%%%%%%%%%%#############%((((((//////////////*** +////////*,,*/(////////((///////////////***///**/**//((##%%%%%%%%%%%%%%%%%%%%%%%%%############%#%(((((///////////////*** +////////*,,*/(///////(((/////////////(***////********/(#%%&&&@&&&%%%%%%%%%%%%%%#%###########%#%#/((((///////////////*** +////////*,,*/(///////((((////////*(###*//*//**********(##%%%&&&&&&&&&%%%%%%%%%%%%%############%(////(/((////////////*** +////////*,,*/(///////(((((///////%#*/////**********((##%%%%%&&&&&&&&&&&%%%%%%%%%%%###(########%(/((////////////////**** +////////*,,*/(////////((((//////#%*/(**/**/////(((#%%#(%@@@&%&@&&&&%&&&%%%%%%%%%%&&&&%%%%%%%%%(((((((//////////////**** +////////*,,*/////////(((((//////#*/((/****///((((((//#&&@@&%%&@&&&&%%%%%%%%%%%&&&&&&&@&&%%##%(//(((((/(////////////**** +////////*,,*/(///////(((((//////((%%%%*****//(((((((/(#%%%&&%&@@@@&%##%%%%#%%%&&&&&&&&%%###%%(//(((((//////////////**** +////////*,,*/(////////((((//////#(%%%*******///((#%%%%%%&&&@@@@@&&%#((#%%##%%&@@@@@&&&%&%####//(((((///////////////**** +////////*,,*/(///////(((((/////*#/#%/********//((#%%&&&&&&&&&&%%%%#(((#%%##%%&&@@@@@@&%&%&%%(//((((((/////////////***** +////////*,,*/(//////(((((///////(%*(%/*******///((%%%%&&%&%%&%%###(((##%%###%&&@@&&&&%%&&&%#(///((((((/////////////**** +////////*,,*/(////////((((//////*/************///(###%%%%%&&%%#(((((##%%%####%%&@&&&%###%%%#///((((((////////////****** +////////*,,*/(////////((((//////**(//**********//(#(##%%%%&%%%((((((##%%%####%%%%%&%%%%%%%%(///((/(((////////////****** +////////*,,*/(////////((((//////(/**/***********/(((##%%%&&&%(/**//(#%%%######%%%%%%%%%##%#//////////////////////****** +////////*,,*/(///////(((((/////#&%&%/***********//((##%&&&%%(/(%@@&((#%%#(((##############///////////////////////****** +////////*,,*/(////////((((////%@%%&&*******//*////((#%%%%%%%%###%&%%%(%%##%&%#%%##########///////////////////////****** +////////**,*/(///////(((((///%@&%&@#*******/**///((#########%%%##%&#%%%%%%%#%%%#((((###///////////////////////******* +////////****/(//////((((((//#@#%###/******////*////(########%%%%%%&%%&%%%%%####%%#######(/////(((((/////////////******* +////////****/(//////((((((/%##%&&&&*******////////(####((((##%%%%%%%%&&%##%#####%######(//////(((((/////////////******/ +////////****/(//////(((((/(&&&&&&&&***////////*///#%%////(##%%%&%%&&&%%#%######%###%(((///(((((//////////////*******/ +////////****/(//////(((/*%&&&&&&@@#****//////////(%&@%%####%%%%&&&&%%%%%#######%#%%///////((((((((///////////*******/ +////////****/(/////(((*/%%%%&&@@@@/***/////////((#%%%%(/(#((%&&&%&&&&&&%%%%%#%%%#%%%///////(((((((((//////////*******// +////////****/(//////***%%%%&@@@@@%****///((////(((####((//(((#%&&%&&&%%%%%&%&&%%#%%(/((//(///((((((////////////******// +////////****/(////***(%%%%%@@@@&@/***////(((((/((((#(((((((((##%%%%%#(##%%%%%%%%%%@&&%##((//(((((/((///////////******// +////////****((//***/#%%%%%%@@&@@#/***////((((((///((((((###%%&&%%&%%%#%%###%%%%%&@@&&&&%%%%####((((///////////******/// +////////****(/**,*/#%%%%%%&@@@@@#///////(((#####((((((((###%%&&&&&&@&%%##%%%%%&@@@@@&&&&&%%#%%#####(//////////******//( +////////********,/%%%%%%%%&@@@@(//////(((###############%%%&&&&%%#####%%%%&@@@@@@@&&&&&&&%%%%%%##(////////******//( +//////*///*******%%%%%%%%&@@@@@&%#(////(((#######%###%#%%%%&&&&&&&%%%%%%%&&@@@@@@@@@&&&@&&&&&%#%%%%%%&&%(/////******//( +//*/((/********/%#%%%%%%%&@@@@@&%%#((//((((##%%####%%%#%%&&&&&&&&&&&&%%&&&@@@@@@@@@&&&&@@&&&&&%%#%%%&%%%%%%##(*****///( +(((///******,,(%%%%%%%%%%%@@@@@@&&%##(((((####%###(###%&&%&&&&@@@@&&&&&&%&@@@@&&@@@&&&&&&&&&&&%%%##%%%%%%%%%%##(/**//(( +/**///*******#%%%##%%%%#%%&@@@@&@&&%%##(((####%%########%%%%%%%&&&&&%%%%&@@@@@@&@@&&&&&&&&%%%%%####%%%%%%%%####/*/((( +//********,*##%##%%%%%###%@@@@@&@@@&%%########%%#######%#%%%%%%%%%%%%%%%@&@@@@@&&@&&&&&&%%%%%%%#%%%%###%%%%%%%%###(/((( +(*****//***##%%##%%%##%##%&@@@@@@@@&&%%%%%%%%%%%%##%%%%%%%&%%%%%%%%%%&@@@@@@@@@&&@&&%%&%&%%####&&%%%#%%##%#%&%%%%###((( +*******/**#%%##%%%%%####%%%@@@@&%@@@@&&%%%%%%%%%%%%%%%%%%%%%%%%%%&@@@@@@&@@@@@@&&@&%%%%%&%%%##%%&&%%%#%%%###%&&%######( +*********#%%#%%%%%%%%##%%%#@@@%@&@@@@@@@@&&%%%%%%%%%%%%%%%%%&@@@@@@@@@@@&@&@@@@&&@%%%###%%%%##%#%&&%%##%%%%###%&%###### +*******/##%#%%#%%%%###%%%##&@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@&@@@@@&&@%%##(#####%%####%&&%%##%%%###%&%##### +((###(((#%#%#%######%%%%%##%@@&&@&%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&@@&@@@&@%###(((%###%%####%&%&%##%&%%##%#### +/(#&&@&(%%%%%%%%%#%&%%#%%###@&@@@&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&@@@@@@&@##((#%%%##%#####%%%&%##%&%%##%%#### +((%&@&%###%%##%#%&&%###%%%##&@@@@@%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@&&##(##%%#%##%#####%%%%%##%&&%#%%#### +(%&&&%%/%#%####%&&%%###%%%%#%@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%&@@@@@@&&@###((%#%%####%#####%%%%%##%%&%###### +%&&&&%#%(%###%%&&&%#%##%&&%%#@@@@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&@@@@@@@&@##(##%##%%####%#####%%%%%#%%&&%##### +&&&&%#%&&&(#%&%%%(#%%#&&&%#@@&&@@@%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&%@&@@@%@@@@&@%#((#%##%%#####%######%%%%%&%%#### +&&&#%&&&&(#%&&%/####&&&%#@&@@@@@&%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&@@@@@@@&(##%#%##%%#####%########&%##%&%#### + +Dan +,//////////////((((((((((((//////////////////////////////***************************************,,,,,,,,,,,,........... +,////////////////((((((((((/////////////////////////////////////***///////////////////////((((((((///////////////////// +,//////////////////(((((((((((((///////////////////////////////***********//////////////////((((((((/////////////////// +,//////////////////((((((((((#((((////////////////////////******************//////////////////((((((/////////////////// +,///////////////////(((###########(((//////////***,,,,,,,,,,,,.....,,,*********//////////////////((((////////////////// +,///////////////////((((############(((/////**,,,,,,,,,,,,...,......,,,,,*********///////////////////////////////////// +,////////////////////(((####%#########((/*,,,,,,,,,,...................,,,,,*******/////////////////////(////////////// +,////////////////////(((#############(/,,,,,,,..........................,,,,,,,*****/////////////////////(///////////// +,/**//////////////////(((###########/,,,,,,,...............................,.,,,******///////////////////////////////// +*//*//////////////////(((((#######(/,,,,,,,,.................................,,,,*******/////////////////////////////// +*//////////////////////((((((#####**,,,,,,,....................................,,,*******////////////////////////////// +*//////**//////////////////((((#(*,,,,,,,,,....................................,,,,********////////*****/////////////// +*////////**/////////////////((((/*,,,,,,,,,....................................,,,,**********//////*******///////////// +*/(((((///****//////////////////*,,,,,,,,,.....................................,,,,,*************////*********///////// +*/////////******///////////////**,,,,,,,,,,,...................................,,,,,***************////***********///// +**/////////*******/////////////*,,,,,,,,,..............,........ ...............,,,,,*//************/////**********//// +*******////*********///////////,,,,,,,,..........,,,//(((((((//**,,................,,*//***************/////**********/ +**********************/////////,,,,,,,,........,,,///(/////(####(//*,,...,,,,,,,,,,***///****************////********** +************************//////*,,,,,,,,,...,,*/((((#(((////(((###((/,,.,,,,*///(###((#(//*****************/////******** +***************************///*,,,***((#%%%%%%&&&%#/*****//(((((////%%######%%%%%%%%%%%#/*******************///******** +*//////**********************/*/(#%%%%&&&&%#((/**((**/(###%#((##(//*/#%%%&&%#(((((((((##(#%#//*****************///***** +/////////****//////*********,,,/(/*********///***((*,,,,,,,***///,,,(#*../&%####%%##%###*/(%&%*****************/////*** +/(/////((/((((((///////*****(#(*,.,,,,,,,,,,,,...,(*.......,,,,,.../#*...,#%****//((####&&%##/*******************/////* +((((((((((##((((((///////**/(/*//*,,,,,,,,,,,,....,*/,............*(,...../#*,,********/(/*(**********************///// +(((((((((####((((////////*****,,***,,,,,,,,,,.......,**/((#######/*.......,/(,,.,,...,**/**/***********************//// +((((((((((((((/////////****,,,,*//*,,,....,,.......... ....,,,,,...... .,*/(#####(((((/****************************/ +/////////////////////*******,,.,,.,,,,....................,,***,,...... .,,/*,,,.,,*//(****************************** +****************//////******,,....,,,..................,,,///,..*,,,,,,,..,,*//(**,,,,,*/****************************** +*****************//////*******......,...............,,,*/((*,....**/(((////(#(/*((*****//****************************** +,,,,*************//////********....,,,,,..........,,,*/(/*,......,,,,*/##%%#((////#//////****************************** +*,,,,,,,,,,******////////***********,,,,,,........,,,/(//*,,........,,*/((((((////#((/(((****************************** +*,,,,,,,,,,,,*****/////////******///,,,,,,,......,,,,*//(#((/***,,,...,,,**///((##(///((/****************************** +*,,,,,,,,,,,,,,*****////////////***,,,,,,,,,.....,...,,...*//*. ,..,.,**/((#&&%(**.,,/((/****************************** +**,,,,,,,,,,,,,,,*****//////////**,,,,,,,,,,,.....,,.,*,....,.. ./##//,,,.,*///********//********************* +**,,,,,,,,,,,,,,,,,*****///////**,,,,,,,,,,,,,,,,,,,,,**,....,,... ...,,,////**/*,////*********/******************//** +***,,,,,,,,,,,,,,,,,,,*****////**,,,,,,,,,,**,,,,,,,,*//*,..........,,,,,**//*/////(((*******************************/* +/**********,,,,,,,,,,,,,*****//*,,,,,,,,,,,**,,,,,,,,/((//*,,,.....,,*******///(#((((********************************** +//**********,,,,,,,,,,,,,,******,,,,.,,,,,,,**,,,.,,,//(//*********///////(((//##((/*********************************** +************,,,,,,,,,,,,,,,,,**,,......,,,,,*****,,.,/(#(/*,,/**,*//((///((((((#((************************************* +***********,,,,,,,,,,,,,,,,,,,,,........,,,*******,,*(#(((/*/****,*****//*//(##%/************************************** +***********,,,,,,,,,,,,,,,,,,,,...........,,,***//****/%%%#/////////*/***/((#%%#**************************************, +***************,,,,,,,,,,,,,*,..............,,,**/////**(####(/((((////(((##%%(***************************************, +*****************,,,,,,,,,,///,..............,,,**///(/////##%((((((/(###%%%#/******************************/*********, +*********************,,,,,,,,,*///,....... ...,,,**/(((((((((##%##%%%%##%##(****************************///((((///***, +********************,,,. ..,,,,,,,**#(*. ......,,,**/((((((((############(/****************************//(##%##(///*, +*/////*************...,,,,,,,,,,*,**,*(%(*. ......,,,**/((###############((*****************************///(#%%##(//*, +////////////****,...,..... .....,*******/#%#/,. .....,,***//(((#########(/********************************///((((////, +(/(///////////,............,.......,,,,****#%%#/*......,,,,**//((((###((((************************************////////, +((//////////*... ........,,,....,,.,,,****/(%%%%(*......,,,**//((((((((/*****************************************///, +((((/////*,............,,,...,,.........,*****,*/#%%%%%(*,...,,,**///////(#(//***************************************/, +((((///*,......................,,*//**/*,..,**,*****(%%%%%%#(*,,,,*******(&((/**************************************, +((((/*,......... .........,,,,,.....,,,,,,,,*********/##%%%%%%%#(///***/#&#(/*************************************, +///*...... ..,,,. ............. .,.......,,,,.....,*,,*****/(##%%%%%%%%%&&&&%%%%(**,,*/******************************, +*,......,*,....................... .,,,. .,,*,,.. .,,************/((##%%%%%%%%%%%#***,///,,,,****,********************, +,....,,*,......,,,,......... ..,,,***,,**,..,****,,,,.....,*********//*//**/////*****.*//*,,..*****,,,****************. +,..,,....,**,..,... ..,,,,,,,,,,....,,******, .. ......,*....,*/***********,,*******,//*..,*,,**.,,*,,,,*************. +.,..,.,**..,,....,*****... ........,,...*/*..,,,...***,.,,,,**/***/////////////**,,,..,..,.,/,,,**,.,,************. +..,.,*,.....,*,,,............ ........,......,/*..,*,,,..,,. ...,,,,,,,*******,,******,...***..**,.,,,.....,*********. +,,*,....,**,. ..... ..,,,**,**,,,,,*,**,,...,,,..*,,,,,....,****,,,,,,,,*,,,,,.....,,,,....*..,,.,*,.,,...,.,*********. \ No newline at end of file From 3e4151c75b3166dca541347740ba4d748923ef72 Mon Sep 17 00:00:00 2001 From: kendrang Date: Sun, 27 Oct 2019 11:01:26 -0400 Subject: [PATCH 09/16] cleaned up the pin menu and framed out some other menus --- src/main/java/Main.java | 134 ++++++++++++----------------- src/main/java/Menu.java | 28 ++++++ src/main/java/TransactionMenu.java | 25 ++++++ 3 files changed, 110 insertions(+), 77 deletions(-) create mode 100644 src/main/java/Menu.java create mode 100644 src/main/java/TransactionMenu.java diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 024280e..7a3bea0 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -2,87 +2,67 @@ * Created by iyasuwatts on 10/17/17. */ -import java.util.InputMismatchException; -import java.util.Scanner; - public class Main { - public static void main(String[] args){ + public static void main(String[] args) { boolean turnOn = true; - - Console.println("Welcome to the ATM ! \n \n" + - "*** *** *** \n" + - "*** *** *** \n" + - "*** *** *** \n" + - "*** *** ***** *** *** *** \n" + - "*** *** ******* *** ******** \n" + - "*********** **** *** *** **** **** \n" + - "*********** *** *** *** *** *** \n" + - "*** *** ********* *** *** *** \n" + - "*** *** ********* *** *** *** \n" + - "*** *** *** *** *** *** \n" + - "*** *** **** *** **** *** \n" + - "*** *** ******** *** ******** \n" + - "*** *** ******* *** *** *** \n" + - " *** \n" + - " *** \n" + - " *** \n==========++=========" + - " \nWould you like to make a new account or do you have an existing account?"); - Integer inputValue = Console.getIntegerInput("Choose: an Option \n 1. I have an existing account \n 2. I want to make a new Account\n 3. Exit ATM " - ); - - switch(inputValue){ - case 1: - String usernameValue = Console.getStringInput( "Welcome back! \n Please input your username: "); - - -// if (pinNumValue== usernamePinNum ){ -// call the transaction methods here -// } - for(int i=1;i<=1000;i++) - { - try - { - Integer pinNumValue = Console.getIntegerInput( " Please input your four digit pin number: "); - if(pinNumValue<=9999 && pinNumValue>=1000) - { - } - else - { - System.out.println("Pin must be four digit"); - - } - - - } - catch(InputMismatchException e) - { - - System.out.println("Error use numbers not alphabets or characters"); - } - } - - - - break; - case 2: - Console.println("Thank you for choosing our bank! Please input your first name:"); - String firstName = Console.getStringInput("First name:"); - String lastName = Console.getStringInput("Last name:"); - System.out.println("Welcome " + firstName + " \n Your new username is :" + firstName+lastName ); - - break; - case 3: - turnOn= false; - break; - - default: - Console.println("Error: invalid option"); - - break; - } + { + + Console.println("Welcome to the ATM ! \n \n" + + "*** *** *** \n" + + "*** *** *** \n" + + "*** *** *** \n" + + "*** *** ***** *** *** *** \n" + + "*** *** ******* *** ******** \n" + + "*********** **** *** *** **** **** \n" + + "*********** *** *** *** *** *** \n" + + "*** *** ********* *** *** *** \n" + + "*** *** ********* *** *** *** \n" + + "*** *** *** *** *** *** \n" + + "*** *** **** *** **** *** \n" + + "*** *** ******** *** ******** \n" + + "*** *** ******* *** *** *** \n" + + " *** \n" + + " *** \n" + + " *** \n==========++=========" + + " \nWould you like to make a new account or do you have an existing account?"); + Integer inputValue = Console.getIntegerInput("Choose an option: \n 1. I have an existing account \n 2. I want to make a new Account\n 3. Exit ATM " + ); + + switch (inputValue) { + case 1: + String usernameValue = Console.getStringInput("Welcome back! \n Please input your username: "); + Integer pinNum = Console.getIntegerInput(" Please input your four digit pin number: "); + Menu.pinMenu(pinNum); + + break; + + + case 2: + Console.println("Thank you for choosing our bank! Please input your first name:"); + String firstName = Console.getStringInput("First name:"); + String lastName = Console.getStringInput("Last name:"); + System.out.println("Welcome " + firstName + " \n Your new username is :" + firstName + lastName); + Integer newPinNum = Console.getIntegerInput(" Please create your four digit pin number: "); + Menu.pinMenu(newPinNum); + break; + case 3: + turnOn = false; + break; + + default: + Console.println("Error: invalid option"); + + break; + } + } System.out.print("Thank you for using our services! Have a nice Day!"); } - } + + + + + + diff --git a/src/main/java/Menu.java b/src/main/java/Menu.java new file mode 100644 index 0000000..30813c7 --- /dev/null +++ b/src/main/java/Menu.java @@ -0,0 +1,28 @@ +import java.util.InputMismatchException; + +public class Menu { + + public static void pinMenu(Integer pinNum) { + + +// if (pinNumValue== usernamePinNum ){ +// call the transaction methods here +// } + for (int i = 1; i <= 1000; i++) { + try { + + if (pinNum <= 9999 && pinNum >= 1000) { + //takes you to Transactions from here + break; + } else { + System.out.println("Pin must be four digit"); + + } + + } catch (InputMismatchException e) { + + System.out.println("Error use numbers not alphabets or characters"); + } + } + } +} diff --git a/src/main/java/TransactionMenu.java b/src/main/java/TransactionMenu.java new file mode 100644 index 0000000..70a2bdb --- /dev/null +++ b/src/main/java/TransactionMenu.java @@ -0,0 +1,25 @@ +public class TransactionMenu { + public static void main(String[] args) { + Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + + " \n 1. Checkings \n 2. Savings \n 3. Investement \n 4. Quit "); + + + switch (inputValue) { + case 1: + + break; + + case 2: + + break; + + case 3: + + break; + + case 4: + turnOn = false; + break; + } + } +} From a733f36eaa6e39ce38d1ab412d61232dcca5ebe0 Mon Sep 17 00:00:00 2001 From: kendrang Date: Sun, 27 Oct 2019 12:59:05 -0400 Subject: [PATCH 10/16] have the skeleton of the transactions menu 90% done --- src/main/java/Account.java | 2 +- src/main/java/Main.java | 1 - src/main/java/TransactionMenu.java | 53 +++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/main/java/Account.java b/src/main/java/Account.java index 8b4cc0e..70812e4 100644 --- a/src/main/java/Account.java +++ b/src/main/java/Account.java @@ -64,7 +64,7 @@ public int getInvAcctNum() { return invAcctNum; } - public double getChkAcctBal() { + public double v() { return chkAcctBal; } diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 7a3bea0..4c28eab 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -53,7 +53,6 @@ public static void main(String[] args) { default: Console.println("Error: invalid option"); - break; } } System.out.print("Thank you for using our services! Have a nice Day!"); diff --git a/src/main/java/TransactionMenu.java b/src/main/java/TransactionMenu.java index 70a2bdb..5c0242e 100644 --- a/src/main/java/TransactionMenu.java +++ b/src/main/java/TransactionMenu.java @@ -1,25 +1,62 @@ public class TransactionMenu { + + public static void main(String[] args) { - Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + - " \n 1. Checkings \n 2. Savings \n 3. Investement \n 4. Quit "); + Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + + " \n 1. Checkings \n 2. Savings \n 3. Investement \n 4. Quit "); + + + switch (inputValue) { + case 1: + + //System.out.println(" Your Checkings balance is $" + Account.getChkAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); + + break; + + case 2: + //System.out.println(" Your Savings balance is $" + Account.getSavAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); + + + break; + + case 3: + //System.out.println(" Your Investment balance is $" + Account.getInvAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); + + + break; + + + } + } + + + public static void transactions(Integer userInput) { + Integer inputValue = Console.getIntegerInput("Choose an option: \n 1. Deposit \n 2. Withdrawl \n 3. Transfer \n 4. Check Balance" + ); + switch (inputValue) { case 1: - + // input deposit method here break; case 2: - + //input Withdrawl method here break; case 3: - + // input Transfer method here break; case 4: - turnOn = false; + break; - } } -} + } From 3ac8359f3cfd4f540c72d5c324210e4079e28e9c Mon Sep 17 00:00:00 2001 From: Jack Harris Date: Sun, 27 Oct 2019 15:51:25 -0400 Subject: [PATCH 11/16] successfully tested acct creation and deposit --- README.md | 2 +- pom.xml | 14 ++++ .../Account.java | 45 ++++++++++- .../AccountsAndTransactions/AccountTest.java | 18 +++++ .../Transactions.java | 36 ++++++--- .../TransactionsTest.java | 20 +++++ src/main/java/Main.java | 76 +++++++++---------- 7 files changed, 158 insertions(+), 53 deletions(-) rename src/main/java/{ => AccountsAndTransactions}/Account.java (63%) create mode 100644 src/main/java/AccountsAndTransactions/AccountTest.java rename src/main/java/{ => AccountsAndTransactions}/Transactions.java (77%) create mode 100644 src/main/java/AccountsAndTransactions/TransactionsTest.java diff --git a/README.md b/README.md index 92d73b7..a66bce8 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Tests should demonstrate proper behavior, and proper handling of misuse (eg. att - Checking - Savings - Investment -- Account Actions +- AccountsAndTransactions.Account Actions - Withdraw from acct - Deposit to acct - Transfer across accounts (self) diff --git a/pom.xml b/pom.xml index 9901415..22c55e3 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,20 @@ io.zipcoder project-2-atm 1.0-SNAPSHOT + + + junit + junit + 4.12 + compile + + + org.junit.jupiter + junit-jupiter + RELEASE + compile + + \ No newline at end of file diff --git a/src/main/java/Account.java b/src/main/java/AccountsAndTransactions/Account.java similarity index 63% rename from src/main/java/Account.java rename to src/main/java/AccountsAndTransactions/Account.java index 8b4cc0e..1c9ec25 100644 --- a/src/main/java/Account.java +++ b/src/main/java/AccountsAndTransactions/Account.java @@ -1,3 +1,5 @@ +package AccountsAndTransactions; + import java.util.ArrayList; public class Account { @@ -18,7 +20,7 @@ public class Account { - alternately, access the spreadsheet every time any transaction is completed, so that if the program crashes before closing all information is still saved */ - //establish all the data stored in the Account object: + //establish all the data stored in the AccountsAndTransactions.Account object: //instances of Accounts should have name [firstLast] private String firstName; private String lastName; @@ -29,7 +31,7 @@ public class Account { private double chkAcctBal; private double savAcctBal; private double invAcctBal; - private ArrayList transactionHistory = new ArrayList(); + public ArrayList transactionHistory = new ArrayList(); //actions that can be called to create a new account bin: public Account(String firstName, String lastName, int pin){ @@ -39,7 +41,7 @@ public Account(String firstName, String lastName, int pin){ } - //create getters for all the data stored in the Account object: + //create getters for all the data stored in the AccountsAndTransactions.Account object: public String getFirstName() { return firstName; } @@ -77,6 +79,43 @@ public double getInvAcctBal() { } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } + public void setPin(int pin) { + this.pin = pin; + } + + public void setChkAcctNum(int chkAcctNum) { + this.chkAcctNum = chkAcctNum; + } + + public void setSavAcctNum(int savAcctNum) { + this.savAcctNum = savAcctNum; + } + + public void setInvAcctNum(int invAcctNum) { + this.invAcctNum = invAcctNum; + } + + public void setChkAcctBal(double chkAcctBal) { + this.chkAcctBal = chkAcctBal; + } + + public void setSavAcctBal(double savAcctBal) { + this.savAcctBal = savAcctBal; + } + + public void setInvAcctBal(double invAcctBal) { + this.invAcctBal = invAcctBal; + } + + public void setTransactionHistory(ArrayList transactionHistory) { + this.transactionHistory = transactionHistory; + } } diff --git a/src/main/java/AccountsAndTransactions/AccountTest.java b/src/main/java/AccountsAndTransactions/AccountTest.java new file mode 100644 index 0000000..44fe6d8 --- /dev/null +++ b/src/main/java/AccountsAndTransactions/AccountTest.java @@ -0,0 +1,18 @@ +package AccountsAndTransactions; + +import org.junit.Assert; +import org.junit.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class AccountTest { + + @Test + public void AccountTest(){ + Account jeff = new Account("Jeff", "Smith",1234); + Assert.assertEquals("Jeff", jeff.getFirstName()); + Assert.assertEquals("Smith", jeff.getLastName()); + Assert.assertEquals(1234, jeff.getPin()); + } + +} \ No newline at end of file diff --git a/src/main/java/Transactions.java b/src/main/java/AccountsAndTransactions/Transactions.java similarity index 77% rename from src/main/java/Transactions.java rename to src/main/java/AccountsAndTransactions/Transactions.java index 3b57cb8..3cd7c4e 100644 --- a/src/main/java/Transactions.java +++ b/src/main/java/AccountsAndTransactions/Transactions.java @@ -1,3 +1,5 @@ +package AccountsAndTransactions; + public class Transactions { /* needed: @@ -15,18 +17,30 @@ public class Transactions { private double increment; //the amount to be changed private String acctType; //the type of account being changed private String acctType2; //used when a second account type is required, such as a transfer + private Account acctName; - public void deposit(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //increase to the new balance - //set the new balance in the bin - //new balance = old balance + increment; - //or //balance += increment; - //save to transaction history (append to array list) + public Transactions(Account acctName) { + this.acctName = acctName; + } + + public void deposit(double increment, String acctType){ + this.increment = increment; //pull the amount being changed + this.acctType = acctType; //determine which account + //determine appropriate account, then perform balance += increment; + if(acctType == "checking"){ + acctName.setChkAcctBal(acctName.getChkAcctBal() + increment); + } + else if (acctType == "savings"){ + acctName.setSavAcctBal(acctName.getSavAcctBal() + increment); + } + else if (acctType == "investment"){ + acctName.setInvAcctBal(acctName.getInvAcctBal() + increment); + } + else { + System.out.println("not a valid account type"); + //then return them to the transaction screen + } + acctName.transactionHistory.add("Deposited $" + increment + " to " + acctType + "."); //append this transaction to the user's transaction history ArrayList } public void withdraw(double increment, String acctType){ diff --git a/src/main/java/AccountsAndTransactions/TransactionsTest.java b/src/main/java/AccountsAndTransactions/TransactionsTest.java new file mode 100644 index 0000000..edfc5ce --- /dev/null +++ b/src/main/java/AccountsAndTransactions/TransactionsTest.java @@ -0,0 +1,20 @@ +package AccountsAndTransactions; + +import org.junit.Assert; +import org.junit.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class TransactionsTest { + + @Test + public void depositTest(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setChkAcctBal(100.00); + Transactions deposit = new Transactions(jeff); + deposit.deposit(100.0,"checking"); + Assert.assertEquals(200.0,jeff.getChkAcctBal(), 0.0); + } + + +} \ No newline at end of file diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 3383302..beb3bd0 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,38 +1,38 @@ -/** - * Created by iyasuwatts on 10/17/17. - */ -public class Main { - - public static void main(String[] args){ - - boolean turnOn = true; - - Console.println("Welcome to the ATM ! Would you like to make a new account or do you have an existing account?"); - double inputValue = Console.getIntegerInput("Choose: 1 or 2 \n 1. I have an existing account \n 2. I want to make a new Account\n" + - "3. Exit ATM " - ); - - int choice; - choice = Console.getIntegerInput(); - - switch(choice){ - case 1: - Console.println( "Welcome back! \n Please input your username: "); - - break; - case 2: - Console.println("Thank you for choosing our bank! Please input your first name:"); - - break; - case 3: - turnOn= false; - break; - - default: - Console.println("Error: invalid option"); - - break; - } - - } -} +///** +// * Created by iyasuwatts on 10/17/17. +// */ +//public class Main { +// +// public static void main(String[] args){ +// +// boolean turnOn = true; +// +// Console.println("Welcome to the ATM ! Would you like to make a new account or do you have an existing account?"); +// double inputValue = Console.getIntegerInput("Choose: 1 or 2 \n 1. I have an existing account \n 2. I want to make a new AccountsAndTransactions.Account\n" + +// "3. Exit ATM " +// ); +// +// int choice; +// choice = Console.getIntegerInput(); +// +// switch(choice){ +// case 1: +// Console.println( "Welcome back! \n Please input your username: "); +// +// break; +// case 2: +// Console.println("Thank you for choosing our bank! Please input your first name:"); +// +// break; +// case 3: +// turnOn= false; +// break; +// +// default: +// Console.println("Error: invalid option"); +// +// break; +// } +// +// } +//} From cca16b4775dc96274ea5caf708c81a7349cf6cde Mon Sep 17 00:00:00 2001 From: Jack Harris Date: Sun, 27 Oct 2019 20:21:54 -0400 Subject: [PATCH 12/16] finished all the transactions, accounts, and associated tests --- .../AccountsAndTransactions/Transactions.java | 130 ++++++++---------- .../TransactionsTest.java | 94 ++++++++++++- 2 files changed, 149 insertions(+), 75 deletions(-) diff --git a/src/main/java/AccountsAndTransactions/Transactions.java b/src/main/java/AccountsAndTransactions/Transactions.java index 3cd7c4e..91b5a29 100644 --- a/src/main/java/AccountsAndTransactions/Transactions.java +++ b/src/main/java/AccountsAndTransactions/Transactions.java @@ -15,17 +15,19 @@ public class Transactions { //establish variables: private double increment; //the amount to be changed + private Account acctName; //the primary account (used for most transactions + private Account acctName2; //used when a second account type is required, such as a transfer) private String acctType; //the type of account being changed private String acctType2; //used when a second account type is required, such as a transfer - private Account acctName; + public Transactions(Account acctName) { this.acctName = acctName; } - public void deposit(double increment, String acctType){ + public void deposit(double increment, String acctType){ this.increment = increment; //pull the amount being changed - this.acctType = acctType; //determine which account + this.acctType = acctType; //determine which account //determine appropriate account, then perform balance += increment; if(acctType == "checking"){ acctName.setChkAcctBal(acctName.getChkAcctBal() + increment); @@ -40,91 +42,73 @@ else if (acctType == "investment"){ System.out.println("not a valid account type"); //then return them to the transaction screen } - acctName.transactionHistory.add("Deposited $" + increment + " to " + acctType + "."); //append this transaction to the user's transaction history ArrayList + acctName.transactionHistory.add(String.format("Deposited $%.2f to " + acctType + ".", increment)); //append this transaction to the user's transaction history ArrayList } public void withdraw(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //ensure sufficient funds - //if sufficient - //decrease from the old balance - //set the new balance in the bin - //save to transaction history (append to array list) - //if insufficient - //"insufficient funds" message - - } - - public void transfer(double increment, String acctType, String acctType2){ - //pull the amount being changed - this.increment = increment; - //determine the origin account - this.acctType = acctType; - //determine the origin account - this.acctType = acctType; - //grab current balance for both accounts - //ensure sufficient funds - //if sufficient - //decrease from the origin balance - //set the new origin balance in the bin - //add to the destination balance - //set the new destination balance in the bin - //save both actions to transaction history (append to array list) - //if insufficient - //"insufficient funds" message + this.increment = increment; //pull the amount being changed + this.acctType = acctType; //determine which account + if(acctType == "checking" && acctName.getChkAcctBal() >= increment) { //if checking && sufficient funds in acct + acctName.setChkAcctBal(acctName.getChkAcctBal() - increment); //decrement checking account + } + else if (acctType == "savings" && acctName.getSavAcctBal() >= increment){ //if savings && sufficient funds in acct + acctName.setSavAcctBal(acctName.getSavAcctBal() - increment); //decrement savings account + } + else if (acctType == "investment" && acctName.getInvAcctBal() >= increment){ //if investment && sufficient funds in acct + acctName.setInvAcctBal(acctName.getInvAcctBal() - increment); //decrement investment acct + } + else { //error or insufficient funds + System.out.println("not a valid account type or insufficient funds in " + acctType + " acct"); + } + acctName.transactionHistory.add(String.format("Withdrew $%.2f from " + acctType + ".", increment)); //append this transaction to the user's transaction history ArrayList } -/* ignore this one - account will be created in account class - public void newAccount(String firstName, String lastName, int pin){ - //create a new account bin containing the first three integers - this.firstName = firstName; - this.lastName = lastName; - this.pin = pin; - //then fill the remainder of the bin with default values + public void transfer(double increment, String acctType, Account acctName2, String acctType2){ + this.increment = increment; //pull the amount being changed + this.acctType = acctType; //determine the origin account + this.acctName2 = acctName2; //Account being deposited into + this.acctType2 = acctType2; //determine the destination account + withdraw(increment, acctType); //withdraw from first user + acctName = acctName2; //switch the account to the second user + deposit(increment, acctType2); //deposit to the second user } -*/ - public void closeAccount(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //increase to the new balance - //set the new balance in the bin - //save to transaction history (append to array list) + //close account will close an empty account, but will not run if the member has money remaining in any account + public void closeAccount(){ + if (acctName.getChkAcctBal() == 0 && acctName.getSavAcctBal() == 0 && acctName.getInvAcctBal() == 0){ + acctName.setFirstName(null); //java cannot delete objects, so instead we will set all bins to null + acctName.setLastName(null); + acctName.setPin(1000); + acctName.transactionHistory.add("Closed all accounts"); + } } -/* -------UNNECESSARY, JUST USE THE GETTER--------------------------- - public void currentBalance(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //increase to the new balance - //set the new balance in the bin - //save to transaction history (append to array list) + //force close account will close all accounts regardless of balance, and dispenses the sum balance in cash before logging out + //think of it like force choking your bank + public void forceCloseAccount(){ + withdraw(acctName.getChkAcctBal(), "checking"); + withdraw(acctName.getSavAcctBal(), "savings"); + withdraw(acctName.getInvAcctBal(), "investment"); + acctName.setFirstName(null); //java cannot delete objects, so instead we will set all bins to null + acctName.setLastName(null); + acctName.setPin(1000); + acctName.transactionHistory.add("Closed all accounts"); } -*/ - public void transactionHistory(double increment, String acctType){ - //pull the amount being changed - this.increment = increment; - //determine which account - this.acctType = acctType; - //grab current balance - //increase to the new balance - //set the new balance in the bin - //save to transaction history (append to array list) + public String[] transactionHistory(){ + String[] history = new String[acctName.transactionHistory.size()]; + for (int i = 0; i < acctName.transactionHistory.size(); i++){ + history[i] = acctName.transactionHistory.get(i); + } + return history; + //get a copy of the transaction history + //convert the copy to a string array + //print it } /* --------------------CHALLENGE------------------------ public void transferOtherUser(double increment, String acctType, String acctType2, user2){ + UPDATE - I forgot this was the challenge and I programmed the transfer this way originally because I thought we had to....... } -----------------------CHALLENGE---------------------*/ diff --git a/src/main/java/AccountsAndTransactions/TransactionsTest.java b/src/main/java/AccountsAndTransactions/TransactionsTest.java index edfc5ce..095846a 100644 --- a/src/main/java/AccountsAndTransactions/TransactionsTest.java +++ b/src/main/java/AccountsAndTransactions/TransactionsTest.java @@ -12,9 +12,99 @@ public void depositTest(){ Account jeff = new Account ("Jeff", "Smith", 1234); jeff.setChkAcctBal(100.00); Transactions deposit = new Transactions(jeff); - deposit.deposit(100.0,"checking"); - Assert.assertEquals(200.0,jeff.getChkAcctBal(), 0.0); + deposit.deposit(100.00,"checking"); + Assert.assertEquals(200.00,jeff.getChkAcctBal(), 0.0); + Assert.assertEquals("Deposited $100.00 to checking.", jeff.transactionHistory.get(0)); //make sure it's also printing to transaction history +// System.out.println(jeff.transactionHistory.get(0)); //ignore this - it's just a double check on the format } + // make sure transaction history is getting recorded for deposits + @Test //sufficient funds - withdraw completed + public void withdrawTest(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setSavAcctBal(100.00); + Transactions withdraw = new Transactions (jeff); + withdraw.withdraw(50.00, "savings"); + Assert.assertEquals(50.00, jeff.getSavAcctBal(), 0.00); + Assert.assertEquals("Withdrew $50.00 from savings.", jeff.transactionHistory.get(0)); //make sure it's also printing to transaction history + //System.out.println(jeff.transactionHistory.get(0)); //ignore this - it's just a double check on the format + + } + + @Test //insufficient funds - withdraw aborted + public void withdrawTest2(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setSavAcctBal(100.00); + Transactions withdraw = new Transactions(jeff); + withdraw.withdraw(200.00, "savings"); + Assert.assertEquals(100.00, jeff.getSavAcctBal(),0.00); + } + + //write a test to make sure transaction history is getting recorded for withdrawals + + @Test //from checking to savings + public void transferTest(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setChkAcctBal(100.00); + jeff.setSavAcctBal(500.00); + Transactions transfer = new Transactions(jeff); + transfer.transfer(50.00, "checking", jeff, "savings"); + Assert.assertEquals(50.00, jeff.getChkAcctBal(), 0.00); + Assert.assertEquals(550.00, jeff.getSavAcctBal(), 0.00); + } + + @Test //from checking to someone else's checking + public void transferTest2(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + Account stan = new Account ("Stan", "Smith", 3434); + jeff.setChkAcctBal(100.00); + stan.setChkAcctBal(500.00); + Transactions transfer = new Transactions(jeff); + transfer.transfer(50.00, "checking", stan, "checking"); + Assert.assertEquals(50.00, jeff.getChkAcctBal(), 0.00); + Assert.assertEquals(550.00, stan.getChkAcctBal(), 0.00); + } + + @Test + public void closeAccount(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setChkAcctBal(0.00); + jeff.setSavAcctBal(0.00); + jeff.setInvAcctBal(0.00); + Transactions closeAccount = new Transactions(jeff); + closeAccount.closeAccount(); + Assert.assertEquals(null, jeff.getFirstName()); + Assert.assertEquals(null, jeff.getLastName()); + Assert.assertEquals(1000, jeff.getPin()); + } + + @Test + public void forceCloseAccount(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + jeff.setChkAcctBal(50.00); + jeff.setSavAcctBal(150.00); + jeff.setInvAcctBal(100.00); + Transactions forceCloseAccount = new Transactions(jeff); + forceCloseAccount.forceCloseAccount(); + Assert.assertEquals(0.00, jeff.getChkAcctBal(), 0.00); + Assert.assertEquals(0.00, jeff.getSavAcctBal(),0.00); + Assert.assertEquals(0.00, jeff.getInvAcctBal(),0.00); + Assert.assertEquals(null, jeff.getFirstName()); + Assert.assertEquals(null, jeff.getLastName()); + Assert.assertEquals(1000, jeff.getPin()); + } + + //make one last test that tests the transaction history + @Test + public void transactionHistoryTest(){ + Account jeff = new Account ("Jeff", "Smith", 1234); + Transactions history = new Transactions(jeff); + history.deposit(100.00, "checking"); + history.withdraw(50.00, "checking"); + String[] expected = {"Deposited $100.00 to checking.","Withdrew $50.00 from checking."}; + Assert.assertEquals(expected, history.transactionHistory()); + + } + } \ No newline at end of file From 690c95be60d202ab2d45fd6ab5d9b88cfc7d19c9 Mon Sep 17 00:00:00 2001 From: Kai Shields Date: Mon, 28 Oct 2019 08:59:56 -0400 Subject: [PATCH 13/16] checkpoint kai --- pom.xml | 6 ++++++ src/main/java/TransactionMenu.java | 2 ++ src/main/java/User.java | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22c55e3..602adb2 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,12 @@ RELEASE compile + + junit + junit + 4.12 + compile + diff --git a/src/main/java/TransactionMenu.java b/src/main/java/TransactionMenu.java index 70a2bdb..ef4bac4 100644 --- a/src/main/java/TransactionMenu.java +++ b/src/main/java/TransactionMenu.java @@ -1,3 +1,5 @@ + + public class TransactionMenu { public static void main(String[] args) { Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + diff --git a/src/main/java/User.java b/src/main/java/User.java index 4a863dc..f47903d 100644 --- a/src/main/java/User.java +++ b/src/main/java/User.java @@ -7,7 +7,7 @@ public class User { public User() { } - public User (String firstName, String lastName, Integer pin, Double balance) { + public User(String firstName, String lastName, Integer pin, Double balance) { setFirstName(firstName); setLastName(lastName); setPin(pin); From 138ad0c7aae330cb2c1ac5666d0928fe60c67fda Mon Sep 17 00:00:00 2001 From: kendrang Date: Wed, 30 Oct 2019 13:19:32 -0400 Subject: [PATCH 14/16] checkpoint before merge --- src/main/java/Account.java | 150 ++++++++++++++--------------- src/main/java/Main.java | 3 + src/main/java/TransactionMenu.java | 42 ++++---- 3 files changed, 100 insertions(+), 95 deletions(-) diff --git a/src/main/java/Account.java b/src/main/java/Account.java index 70812e4..3566584 100644 --- a/src/main/java/Account.java +++ b/src/main/java/Account.java @@ -1,81 +1,81 @@ import java.util.ArrayList; public class Account { - - /* - Things we need here: - 1. checking accounts - 2. savings accounts - 3. investment accounts - ***bins would probably be a good way to store this information - have a bin for each user with a slot for each account - - Things we may also need here? - 1. account balance - there's already a balance value in the User.java tab, but it might work better here because we need separate balances in each type of account - 2. account number - 3. BONUS - Persistence - - create a way to store user information, account balances, etc - - probably the best way if we get to this would be to save a current state of all account balances to a spreadsheet when we close the ATM app - - alternately, access the spreadsheet every time any transaction is completed, so that if the program crashes before closing all information is still saved - */ - - //establish all the data stored in the Account object: - //instances of Accounts should have name [firstLast] - private String firstName; - private String lastName; - private int pin; - private int chkAcctNum; - private int savAcctNum; - private int invAcctNum; - private double chkAcctBal; - private double savAcctBal; - private double invAcctBal; - private ArrayList transactionHistory = new ArrayList(); - - //actions that can be called to create a new account bin: - public Account(String firstName, String lastName, int pin){ - this.firstName = firstName; - this.lastName = lastName; - this.pin = pin; - } - - - //create getters for all the data stored in the Account object: - public String getFirstName() { - return firstName; - } - - public String getLastName() { - return lastName; - } - - public int getPin() { - return pin; - } - - public int getChkAcctNum() { - return chkAcctNum; - } - - public int getSavAcctNum() { - return savAcctNum; - } - - public int getInvAcctNum() { - return invAcctNum; - } - - public double v() { - return chkAcctBal; - } - - public double getSavAcctBal() { - return savAcctBal; - } - - public double getInvAcctBal() { - return invAcctBal; - } - +// +// /* +// Things we need here: +// 1. checking accounts +// 2. savings accounts +// 3. investment accounts +// ***bins would probably be a good way to store this information - have a bin for each user with a slot for each account +// +// Things we may also need here? +// 1. account balance - there's already a balance value in the User.java tab, but it might work better here because we need separate balances in each type of account +// 2. account number +// 3. BONUS - Persistence +// - create a way to store user information, account balances, etc +// - probably the best way if we get to this would be to save a current state of all account balances to a spreadsheet when we close the ATM app +// - alternately, access the spreadsheet every time any transaction is completed, so that if the program crashes before closing all information is still saved +// */ +// +// //establish all the data stored in the Account object: +// //instances of Accounts should have name [firstLast] +// private String firstName; +// private String lastName; +// private int pin; +// private int chkAcctNum; +// private int savAcctNum; +// private int invAcctNum; +// private double chkAcctBal; +// private double savAcctBal; +// private double invAcctBal; +// private ArrayList transactionHistory = new ArrayList(); +// +// //actions that can be called to create a new account bin: +// public Account(String firstName, String lastName, int pin){ +// this.firstName = firstName; +// this.lastName = lastName; +// this.pin = pin; +// } +// +// +// //create getters for all the data stored in the Account object: +// public String getFirstName() { +// return firstName; +// } +// +// public String getLastName() { +// return lastName; +// } +// +// public int getPin() { +// return pin; +// } +// +// public int getChkAcctNum() { +// return chkAcctNum; +// } +// +// public int getSavAcctNum() { +// return savAcctNum; +// } +// +// public int getInvAcctNum() { +// return invAcctNum; +// } +// +// public double v() { +// return chkAcctBal; +// } +// +// public double getSavAcctBal() { +// return savAcctBal; +// } +// +// public double getInvAcctBal() { +// return invAcctBal; +// } +// diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 4c28eab..8eeed97 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -9,6 +9,7 @@ public static void main(String[] args) { boolean turnOn = true; { + Console.println("Welcome to the ATM ! \n \n" + "*** *** *** \n" + "*** *** *** \n" + @@ -36,6 +37,7 @@ public static void main(String[] args) { Integer pinNum = Console.getIntegerInput(" Please input your four digit pin number: "); Menu.pinMenu(pinNum); + break; @@ -46,6 +48,7 @@ public static void main(String[] args) { System.out.println("Welcome " + firstName + " \n Your new username is :" + firstName + lastName); Integer newPinNum = Console.getIntegerInput(" Please create your four digit pin number: "); Menu.pinMenu(newPinNum); + break; case 3: turnOn = false; diff --git a/src/main/java/TransactionMenu.java b/src/main/java/TransactionMenu.java index 5c0242e..27ff824 100644 --- a/src/main/java/TransactionMenu.java +++ b/src/main/java/TransactionMenu.java @@ -4,38 +4,38 @@ public class TransactionMenu { public static void main(String[] args) { - Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + - " \n 1. Checkings \n 2. Savings \n 3. Investement \n 4. Quit "); + Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + + " \n 1. Checkings \n 2. Savings \n 3. Investement \n 4. Quit "); - switch (inputValue) { - case 1: + switch (inputValue) { + case 1: - //System.out.println(" Your Checkings balance is $" + Account.getChkAcctBal()); - //System.out.println ("What would you like to do?") - // transactions(); + //System.out.println(" Your Checkings balance is $" + Account.getChkAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); - break; + break; - case 2: - //System.out.println(" Your Savings balance is $" + Account.getSavAcctBal()); - //System.out.println ("What would you like to do?") - // transactions(); + case 2: + //System.out.println(" Your Savings balance is $" + Account.getSavAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); - break; + break; - case 3: - //System.out.println(" Your Investment balance is $" + Account.getInvAcctBal()); - //System.out.println ("What would you like to do?") - // transactions(); + case 3: + //System.out.println(" Your Investment balance is $" + Account.getInvAcctBal()); + //System.out.println ("What would you like to do?") + // transactions(); - break; + break; - } } + } public static void transactions(Integer userInput) { @@ -58,5 +58,7 @@ public static void transactions(Integer userInput) { case 4: break; + } + } - } +} \ No newline at end of file From c9457b53801ca74e8cd7104c661e90732fec2d22 Mon Sep 17 00:00:00 2001 From: kendrang Date: Wed, 30 Oct 2019 15:54:57 -0400 Subject: [PATCH 15/16] figured some stuff out --- src/main/java/AccountsAndTransactions/Account.java | 7 ++++--- src/main/java/Main.java | 1 + src/main/java/TransactionMenu.java | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/AccountsAndTransactions/Account.java b/src/main/java/AccountsAndTransactions/Account.java index 543ee17..08c865f 100644 --- a/src/main/java/AccountsAndTransactions/Account.java +++ b/src/main/java/AccountsAndTransactions/Account.java @@ -3,6 +3,7 @@ import java.util.ArrayList; public class Account { + private static double chkAcctBal; /* @@ -29,7 +30,7 @@ public class Account { private int chkAcctNum; private int savAcctNum; private int invAcctNum; - private double chkAcctBal; + private double savAcctBal; private double invAcctBal; public ArrayList transactionHistory = new ArrayList(); @@ -67,7 +68,7 @@ public int getInvAcctNum() { return invAcctNum; } - public double getChkAcctBal() { + public static double getChkAcctBal() { return chkAcctBal; } @@ -78,7 +79,7 @@ public double getSavAcctBal() { public double getInvAcctBal() { return invAcctBal; } - + public void setFirstName(String firstName) { this.firstName = firstName; diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 7622295..e855118 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -49,6 +49,7 @@ public static void main(String[] args) { System.out.println("Welcome " + firstName + " \n Your new username is :" + firstName + lastName); Integer newPinNum = Console.getIntegerInput(" Please create your four digit pin number: "); Menu.pinMenu(newPinNum); + TransactionMenu.accountsMenu(); break; case 3: diff --git a/src/main/java/TransactionMenu.java b/src/main/java/TransactionMenu.java index 530523f..5cf759f 100644 --- a/src/main/java/TransactionMenu.java +++ b/src/main/java/TransactionMenu.java @@ -1,9 +1,9 @@ - +import AccountsAndTransactions.Account; public class TransactionMenu { - public static void main(String[] args) { + public static void accountsMenu() { Integer inputValue = Console.getIntegerInput("Please choose which account you want to access" + @@ -13,8 +13,8 @@ public static void main(String[] args) { switch (inputValue) { case 1: - //System.out.println(" Your Checkings balance is $" + Account.getChkAcctBal()); - //System.out.println ("What would you like to do?") + System.out.println(String.format(" Your Checkings balance is $%.2f",Account.getChkAcctBal())); + System.out.println ("What would you like to do?"); // transactions(); break; From b303559bc5fa598a026a2b0b75589cff5fae0ce5 Mon Sep 17 00:00:00 2001 From: Kai Shields Date: Thu, 31 Oct 2019 08:11:35 -0400 Subject: [PATCH 16/16] checkpoint --- pom.xml | 6 ++++++ src/main/java/AccountsAndTransactions/TransactionsTest.java | 2 +- src/main/java/User.java | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 602adb2..578d489 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,12 @@ 4.12 compile + + junit + junit + 4.12 + compile + diff --git a/src/main/java/AccountsAndTransactions/TransactionsTest.java b/src/main/java/AccountsAndTransactions/TransactionsTest.java index 095846a..ab6e782 100644 --- a/src/main/java/AccountsAndTransactions/TransactionsTest.java +++ b/src/main/java/AccountsAndTransactions/TransactionsTest.java @@ -3,9 +3,9 @@ import org.junit.Assert; import org.junit.Test; -import static org.junit.jupiter.api.Assertions.*; public class TransactionsTest { +2 @Test public void depositTest(){ diff --git a/src/main/java/User.java b/src/main/java/User.java index f47903d..5b8b57e 100644 --- a/src/main/java/User.java +++ b/src/main/java/User.java @@ -1,9 +1,14 @@ +import AccountsAndTransactions.Account; + +import java.util.ArrayList; + public class User { private String firstName; private String lastName; private Integer pin; private Double balance; + private ArrayList accsStored = new ArrayList(); public User() { }