Wridemy Plagiarism Free Paper Writing Website. Visit us here Wridemy
Modify the Bank Account class you created to have the following additional functionality When the object is created, it should create two types of account Checking and Saving ( you can user Boolean variables to identify between these accounts)Initialize balance on both accounts to $0The constructor calls a method called setAccountPassWord() setAccountPassWord () This method asks the user to enter a pin number. It checks to make sure the Pin number is between 4-8 digit numerical valueIt calls another method called encryptData()the value return from enCryptData is stored as the user security pin number. enCryptData() This method takes integer value as its argumentIt encrypts the integer value using mod21 encryption security. Returns the encrypted value to calling function. Example 12345 %21 – this returns 18 which is the remainder 656564 % 21 – this returns 20 which is the remainder Add the following additional methods Withdraw () Asks for security pin.Checks if pin entered matches the user security If not, continue to ask user for security pin until valid pin is entered. Asks if withdraw from checking account or saving accountChecks If withdraw amount is less than balanceWithdraws the amount, and updates account balance Deposit() Asks for security pin.Checks if pin entered matches the user security If not, continue to ask user for security pin until valid pin is entered. Asks if withdraw from checking account or saving accountUpdates account balance with new balance Transfer() Asks for security pin.Checks if pin entered matches the user security If not, continue to ask user for security pin until valid pin is entered. Asks from and to account to transfer money (checking to saving or saving to checking_Updates both accounts balance DisplayBalance() Asks for security pin.Checks if pin entered matches the user security If not, continue to ask user for security pin until valid pin is entered. Prints the account balance on both checking and Saving Test your code with the followings Create an account called myAccountCall DisplayBalance()Deposit $100 in saving accountDeposit $150 in checking accountDisplay BalanceTransfer $50 from saving account into checking accountDisplay balanceTry to withdraw $200 from your saving account and see what happens.You must properly display code and inform the end user if there is not funding in the accountWithdraw $25 from saving account Display Balance
The post Modify the Bank Account class you created to have the follo appeared first on Wridemy. Visit us here Wridemy for plagiarism free papers.