Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in matlab using objects and classes Problem 2: Bank Account Create an object oriented programing account class for a bank. Each account class contains

code in matlab using objects and classes image text in transcribed

Problem 2: Bank Account Create an object oriented programing account class for a bank. Each account class contains the following information (properties): name on the account, account type, balance, interest accrual rate, account number, pin number, and whether or not the account was locked by entering the incorrect pin. Also include an account number private property which cannot be changed and a pin property that can be reset but can't viewed publicly. As an example create an object: A bank customer with name 'A. Smith', account type checking, balance $5,000, yearly interest rate 1%, pin number 0101, account number 1234567, and account not locked (locked flag set to 0) Your class must include methods that do the following When a customer makes a deposit of $5000 at the bank, add the deposit amount to the existing balance and show the updated balance and the information (non-private information) of the account. Calculate the interest made on the accountthis vear if the interest is the balance*yearly interest rate. Add this to the existing balance and display "The interest accrued this year is and the new balance is"with the correct values shown When a customer wants to view the account balance, prompt the user for the pin number. If a customer enters the correct pin, show the account balance and account number. If a customer enters the incorrect display 'account locked' and set the locked flag to 1. When a customer is locked out of their account, prompt them to enter the account number. If the account number is correct, prompt the user to set a new pin number and clear the locked flag by setting it to 0. If the customer enters the wrong account number display 'Wrong account number, please try again later'. Problem 2: Bank Account Create an object oriented programing account class for a bank. Each account class contains the following information (properties): name on the account, account type, balance, interest accrual rate, account number, pin number, and whether or not the account was locked by entering the incorrect pin. Also include an account number private property which cannot be changed and a pin property that can be reset but can't viewed publicly. As an example create an object: A bank customer with name 'A. Smith', account type checking, balance $5,000, yearly interest rate 1%, pin number 0101, account number 1234567, and account not locked (locked flag set to 0) Your class must include methods that do the following When a customer makes a deposit of $5000 at the bank, add the deposit amount to the existing balance and show the updated balance and the information (non-private information) of the account. Calculate the interest made on the accountthis vear if the interest is the balance*yearly interest rate. Add this to the existing balance and display "The interest accrued this year is and the new balance is"with the correct values shown When a customer wants to view the account balance, prompt the user for the pin number. If a customer enters the correct pin, show the account balance and account number. If a customer enters the incorrect display 'account locked' and set the locked flag to 1. When a customer is locked out of their account, prompt them to enter the account number. If the account number is correct, prompt the user to set a new pin number and clear the locked flag by setting it to 0. If the customer enters the wrong account number display 'Wrong account number, please try again later

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions