Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

CSC 325 Bank Account – Part 2

CSC 325 Bank Account – Part 2

CSC 325 Bank Account – Part 2

Question Description

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 $0
    • The 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 value
  • It 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 argument
  • It 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 account
  • Checks If withdraw amount is less than balance
  • Withdraws 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 account
  • Updates 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 myAccount
    • Call DisplayBalance()
  • Deposit $100 in saving account
  • Deposit $150 in checking account
    • Display Balance
  • Transfer $50 from saving account into checking account
    • Display balance
  • Try 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 account
  • Withdraw $25 from saving account

Display Balance

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Top Grade Essays only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Top Grade Essays are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Top Grade Essays is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Top Grade Essays, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.