Question

Perform a desk check for each case and verify that the algorithm produces the expected results....

Perform a desk check for each case and verify that the algorithm produces the expected results. A template is attached to use for the desk check. (Please help me with this) An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient funds and gives the customer the option to withdraw the money for a service charge of $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw any money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn. Here is an algorithm that allows the customer to enter the amount to be withdrawn, checks the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn and the service charges, if any:

Get balance

Write “Your current balance is $”, balance

Write “Enter amount to withdraw: “

Get amount

Set serviceFee = 0

If (amount >= 500)

Write “Cannot withdraw more than $500 per day”

Set amount = 0

Else if (balance <= 0)

Write “Balance at or below 0”

Set amount = 0

Else if (amount > balance)

Write “Insufficient funds, $25 service charge will apply, continue (y/n)?”

Get option

If (option = ‘y’)

Set serviceFee = serviceFee + 25

else

Set amount = 0

If (amount > 300)

Set serviceFee = serviceFee + (amount – 300) * .04

If (amount > 0)

Set balance = balance – amount – seviceFee

Write “Amount dispensed: $”, amount

Write “Service fees charged: $”, serviceFee

Write “New balance: $”, balance

Else

Write “Transaction cancelled”

Here is a white box text plan for this algorithm:

Case

Description

balance

withdrawal

total service

charges

new balance

1

Withdrawal over daily limit

500

600

0

500

2

Balance below 0

-10

100

0

-10

3

Sufficient funds, withdrawal within limit

500

100

0

400

4

Sufficient funds, withdrawal over limit

500

350

2

148

5

Insufficient funds, customer withdraws, withdrawal over limit

300

350

27

-77

6

Insufficient funds, customer does not withdraw, withdrawal within limit

100

150

0

100

For each case complete the table

Case ______________________________________________________

Statement

balance

amount

serviceFee

option

Selection Test

Message

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below are the desk checks for all the given test cases:

This completes the requirement. Let me know if you have any queries.

Thanks!

Add a comment
Know the answer?
Add Answer to:
Perform a desk check for each case and verify that the algorithm produces the expected results....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • how can i code this only using a textbox for results Create Windows Forms applications called...

    how can i code this only using a textbox for results Create Windows Forms applications called ATM Project that allows the customer to deposit the initial amount and enter the amount to be withdrawn. You need to display the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn including any service charges. The ATM allows a customer to withdraw a maximum of $500 per transition in $20 increments. If a...

  • Questions Draw sequence diagram based on the use case Draw activity diagram based on the use...

    Questions Draw sequence diagram based on the use case Draw activity diagram based on the use case Draw state diagram of the ATM machine of the Customer account Summary Description: Allows any bank customer to obtain cash from their bank account. Actor(s): • Bank Customer (primary) • Banking System (secondary) Pre-Condition: • The ATM is operational • The bank customer has a card to insert into the ATM Post-Condition: • The bank customer has received their cash (and optionally a...

  • BANKING MANAGEMENT

    Banking System is developed in C++ to replaced manual System by a computerized system. This system allows to create a new account and Allows to deposit and withdrawal amount facilities. Account Holder ABS must record the detailed information of each account holder, such as  Type of his account (see next slides for more info)  Type of Credit card (see later slides for more info)  First name, middle name, and last name  CNIC number Address Telephone number Date of...

  • Trying to figure out how to complete my fourth case 4 (option exit), write a function...

    Trying to figure out how to complete my fourth case 4 (option exit), write a function that display a “Good Bye” message and exits/log out from user’s account displaying a menu (sign in, balance, withdraw and exit.. #include<iostream> #include <limits> using namespace std; void printstar(char ch , int n); double balance1; int main() { system("color A0"); cout<<"\n\t\t ========================================="<< endl; cout<<"\t\t || VASQUEZ ATM SERVICES ||"<< endl; cout<<"\t\t ========================================\n\n"<< endl; int password; int pincode ; cout<<" USERS \n"; cout<<" [1] -...

  • please rewrite this code as Pseudo-Code,.. basically rewrite the code but in english language , Thank...

    please rewrite this code as Pseudo-Code,.. basically rewrite the code but in english language , Thank you so much! public abstract class BankAccount {    //declare the required class variables    private double balance;    private int num_deposits;    private int num_withdraws;    private double annualInterest;    private double serviceCharges;       //constructor that takes two arguments    // one is to initialize the balance and other    // to initialize the annual interest rate       public BankAccount(double balance,...

  • C++

    /*Colesha PearmanCIS247CATM ApplicationMay 4,2020*///Bring in our libaries#include"stdafx.h" #include<iostream>#include<conio.h>#include<string>#include<fstream>//read/write to files#include<ctime>//time(0)#include<iomanip>//setpresision stdusing namespace std; //create constant vaules-- cannot be changedconst int EXIT_VALUE = 5;const float DAILY_LIMIT = 400.0f;const string FILENAME = "Account.txt"; //create balance variabledouble balance = 0.0; //prototypesvoid deposit(double* ptrBalance);void withdrawal(double* ptrBalance, float dailyLimit);  //overloaded method-this verision does not take withdrawal amount void withdrawal(double* ptrBalance, float dailyLimit, float amount);  //overloaded method that takes withdrawal amount ///Enrty point to the application int main(){                 //look for the starting balance; otherwise generate a random balance                 ifstream...

  • TASK 1 Create a new class called CheckingAccount that extends BankAccount. It should contain a static...

    TASK 1 Create a new class called CheckingAccount that extends BankAccount. It should contain a static constant FEE that represents the cost of clearing onecheck. Set it equal to 15 cents. Write a constructor that takes a name and an initial amount as parameters. Itshould call the constructor for the superclass. It should initializeaccountNumber to be the current value in accountNumber concatenatedwith -10 (All checking accounts at this bank are identified by the extension -10). There can be only one...

  • C++ Banks offer various types of accounts, such as savings, checking, certificate of deposits, and money...

    C++ Banks offer various types of accounts, such as savings, checking, certificate of deposits, and money market, to attract customers as well as meet their specific needs. Two of the most commonly used accounts are savings and checking. Each of these accounts has various options. For example, you may have a savings account that requires no minimum balance but has a lower interest rate. Similarly, you may have a checking account that limits the number of checks you may write....

  • how do i fix the errors? 1) Write an Account class that models a bank account...

    how do i fix the errors? 1) Write an Account class that models a bank account with the following data and operations. Data - The identity number for the account, which is an integer - The balance in the account Operations - create an account with a given identity number and initial balance .return the identity number - return the current balance - set the balance to some amount deposit some amount into the account, increasing the balance - withdraw...

  • Please help JAVA Part II: Programming Module (80 marks): Write a banking program that simulates the operation of your l...

    Please help JAVA Part II: Programming Module (80 marks): Write a banking program that simulates the operation of your local bank. You should declare the following collection of classes: 1) An abstract class Customer: each customer has: firstName(String), lastName (String), age (integer), customerNumber (integer) - The Class customer has a class variable lastCustomerNumber that is initialized to 9999. It is used to initialize the customerNumber. Hence, the first customer number is set to 9999 and each time a new customer...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT