Question: This is MATLAB Problem Description You were just hired by a bank in the area to fix a buggy program written by a since fired

This is MATLAB

Problem Description

You were just hired by a bank in the area to fix a buggy program written by a since fired programmer. This function is supposed to do the following:

Receive a method (withdraw, deposit, or balance)

Perform the respective operation and return the current account balance

If the withdrawal amount exceeds the balance, cancel the transaction and return the balance

The account balance should persist between function calls. For example, if you did the following:

>> bankingsystem('d', 10000) % deposit 10,000 ans = 10000 >> bankingsystem('w', 5000) % withdraw 5,000 ans = 5000 >> bankingsystem('b', 0) % the amount doesn't matter when getting the balance ans = 5000 >> bankingsystem('w', 10000) % the account is overdrawn! ans = 5000 

The main function header, bankingsystem() has been written for you and it is up to you to fix the issues so this bank can be up and running again!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!