1- TigerOne Bank is a local bank that intends to install a new
automated teller machine (ATM) to allow its customers to perform
basic financial transactions. Using the ATM machine users should be
able to view their account balance, withdraw cash and deposit
funds. The bank wants you to develop the software application that
will be installed on the new ATM machines. The following are the
requirements for the application: Users are uniquely identified
by an account number and a Personal Identification Number (PIN)
To use the ATM machine, the user is required to enter their Account
Number and the associated PIN. The user interface should look like
the following:
After validating the information, the application displays the
following screen that contains a list of the available
option.
Write a C++ program to implement the requirements listed above and
displays the selected choice to the screen.
Welcome to TigerOne Bank
Main menu ------------------------ 1- View account balance 2-
Withdrawal 3- Deposit 4- Exit
Please enter your choice:
Welcome to TigerOne Bank
Please enter your account number: 12345
Please enter your PIN: 6579
Guidelines: Part of your grade will be for the programming style
used. Here are some guidelines: o Each program file should begin
with a comment section giving the name of the file, the author's
name, the date the file was last modified, and a description of its
purpose. In addition, it is also consider good programming practice
to include any assumptions you have made (such as assumptions about
reasonable input) and any error-checking that has been provided.
For example, /* filename: make_change.cpp author: L. Stauffer date
last modified: 8/17/2007 This program accepts a dollar amount
specified by the user and displays the minimum number of $10, $5,
and $1 bills required to make up the amount. */
o Use meaningful and descriptive identifiers for variable names.
This can make a program easier to understand.
o Insert comments in your program. A comment should appear
after/before each declaration and after/before a statement to
provide information which is not obvious. For example:
int total_cost, item_count; //total cost of item_count purchases
double average_cost; //average cost of an item, to be
computed
o Use consistent and reasonable indentation conventions throughout
your program to improve program readability. Avoid using several
spaces for an indent - instead use a tab. If there are several
levels of indentation, each level should be indented the same
additional amount of space.
1. Modify the ATM simulation program you did in homework 1 to
use methods (functions). So, in addition to the main method, your
application should have the following methods:
authenticateUser: This method reads the Account Number and the
PIN entered by the user and validates it against the actual account
number and PIN. If the entered information matches the account
information, the method ends and returns true otherwise it displays
a message that the information entered does not match the account
information then gives the user another chance to enter the account
number and PIN. The user is given a total of 3 chances to enter the
correct account number and PIN. If the user fails to enter the
correct information after 3 trials, the method ends and returns
false.
showMenu: This method is called from the main method and displays
the menu options then waits for the user to make a selection. Once
the selection is made by the user, the method ends and returns the
choice of the user to the main method. This method does not take
any parameters.
viewBalance: This mthod is called by the main method after the
menu has been displayed and the user selected option 1 from the
menu. It does not take any parameters and does not return anything.
It only displays a message saying “You selected View Balance”
withdrawCash: This method is called by the main method after the
menu has been displayed and the user selected option 2 from the
menu. It does not take any parameters and does not return anything.
It only displays a message saying “You selected Withdraw Cash”
depositCash: This method is called by the main method after the
menu has been displayed and the user selected option 3 from the
menu. It does not take any parameters and does not return anything.
It only displays a message saying “You selected Deposit
Cash”
2. Assume that: - The account number is 12345 - The PIN is
54321
Hint: declare the above as global variables so that they can be
seen by all the methods in the program.
3. The main method should start by calling the authenticateUser
method. If the authenticateUser method returns true, the main
method will continue but if the authenticateUser returns false, the
main method should end the program.
4. Once the auhtenticateUsr method returns true to the main method,
the main method should call the showMenu method to display the menu
options and get the user selection.
5. When the showMenu method return the user selection to the main
method, the main method should perform the selected option as
follows:
If the user selected 1, it should call the viewBalance method.
If the user selected 2, it should call the withdrawCash method.
If the user selected 3, it should call the depositCash method. If
the user selected 4, it should end the program.
6. After performing the selected option, the main method must
display the menu again to the user and wait for a new selection (by
calling the showMenu method). This is done only if the selected
option was not 4.
7. The program should continue running until the user selects
option “4- Exit”
8. If the user selects an option that is not in the menu, the
program should display an error message saying “Invalid selection,
please try again..!” and goes back to the menu again and wait for a
new selection.
I am giving you the full code for this C++ program here. Indentation could get effect here in this editor but you can simply copy below code and paste it in your C++ editor. If there is any query related to this program. Do let me know in the comments.
/******************************************************************************
filename: TigerOnebank.cpp
author: --
last modified: --
This program simulates the Bank Atm. Hence it helps to perform
these options like
-> View Balance
-> Deposit Cash
-> Withdraw Cash
*******************************************************************************/
#include <iostream>
#include<string.h>
using namespace std;
char validAccountNumber[]="12345"; //Default Account Number
char validAtmPin[]="54321"; // Default ATM Pin
/*
* @author :
* This method is showing all the main menu options which list
* the operations an ATM can perform.
*
*/
void showMenu()
{
cout << "Main Menu" <<endl;
cout <<
"---------------------------------------------"<<endl;
cout << "1- View` account balance"<<endl;
cout << "2- Withdrawal"<<endl;
cout << "3- Deposit"<<endl;
cout << "4- Exit "<<endl;
cout <<
"---------------------------------------------"<<endl;
}
/*
* @author :
* This method is shows the current balance related to the
Account.
*/
void viewBalance()
{
cout << "You selected View
Balance"<<endl<<endl;
}
/*
* @author :
* This method is used to withdraw the cash from the Account.
*/
void withdrawCash()
{
cout << "You selected Withdraw
Cash"<<endl<<endl;
}
/*
* @author :
* This method is used to deposit the cash from the Account.
*/
void depositCash()
{
cout << "You selected Deposit
Cash"<<endl<<endl;
}
/*
* @author :
* This method is used to authentic the user based on the Account
Number and Account Pin
* that User enterd .
*/
bool authenticateUser()
{
char accountNumber[50];
char atmPin[6];
// athenticateUser is defined as the Label which is used as the
check point to repeat again if user is not valid.
athenticateUser:
cout << "Please enter your Account Number: ";
cin >> accountNumber;
cout << "Please enter you ATM Pin: ";
cin >> atmPin ;
//validating account number and pin that user entered with the
default.
if(strcmp(accountNumber, validAccountNumber)!=0 || strcmp(atmPin,
validAtmPin)!=0)
{
cout << endl << "Sorry! You have entered wrong account
information. Please try again."<<endl;
goto athenticateUser;
}
return true; /* Returning true because in case user will not be
authentic then it will ask the account number and atmPin
again and again.*/
}
/**
* This is main entry point for the c++ program.
*/
int main()
{
bool authentic=authenticateUser();
char input='0';
cout << "Welcome to TigerOne Bank"<<endl;
do
{
showMenu(); // Show all the menus that user can use.
cin >> input;
switch(input)
{
case '1':
viewBalance();
break;
case '2':
withdrawCash();
break;
case '3':
depositCash();
break;
case '4':
cout << "Thank you for using the program."<<endl;
break;
default:
cout<<"You have entered wrong input. Please Try
Again.";
showMenu();
cin >> input;
break;
}
}while(input!='4' && authentic);
return 0;
}
1- TigerOne Bank is a local bank that intends to install a new automated teller machine...
Question 3.1 Draw the class diagram for the ATM program in
Question 2.1.
Please find attached the scenario in the photos.
this is for programming logic and design
Scenario A local bank intends to install a new automated teller machine (ATM) to allow users (i.e., bank customers) to perform basic financial transactions (see below figure). Each user can have only one account at the bank. ATM users should be able to do the following; View their account balance. Withdraw cash...
Please do not copy other solution from the site as they never fully implement all the listed guidelines below. Please write a shell script called atm.bash similar to the ones used in ATM machines. Essentially your script is to handle a person's savings and checking accounts and should handle the following services: Transfer from savings account to checking account Transfer from checking account to savings account Cash withdrawal from either account Balance statements for both the...
You have been hired as a programmer by a major bank. Your first project is a small banking transaction system. Each account consists of a number and a balance. The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, and balance inquiries. The application consists of the following functions: N- New account W- Withdrawal D- Deposit B- Balance Q- Quit X- Delete Account Use the following...
PYTHON The provided code in the ATM program is incomplete. Complete the run method of the ATM class. The program should display a message that the police will be called after a user has had three successive failures. The program should also shut down the bank when this happens. [comment]: <> (The ATM program allows a user an indefinite number of attempts to log in. Fix the program so that it displays a message that the police will be called...
Write a program called problem4.cpp to implement an automatic teller machine (ATM) following the BankAccount class the we implemented in class. Your main program should initialize a list of accounts with the following values and store them in an array Account 101 → balance = 100, interest = 10% Account 201 → balance = 50, interest = 20% Account 108 → balance = 200, interest = 11% Account 302 → balance = 10, interest = 5% Account 204 → balance...
Programming Instructions:Using Java Object Oriented Principles, write a program which produces the code as indicated in the following specifications: Your program must be a console application that provides a user this exact menu:Please select one of the following:1: Add Client to Bank2: Display Clients in the Bank3: Set Bank Name4: Search for a Client5: Exit Enter your Selection: <keyboard input here> The menu must be displayed repeatedly until 5...
Write a contacts database program that presents the user with a menu that allows the user to select between the following options: (In Java) Save a contact. Search for a contact. Print all contacts out to the screen. Quit If the user selects the first option, the user is prompted to enter a person's name and phone number which will get saved at the end of a file named contacts.txt. If the user selects the second option, the program prompts...
Methods: Net beans IDE Java two methods. Identifier: calculateScore(String word) Parameters: word – the word for which you should calculate the points in Scrabble Return Value: int – the number of points for the parameter word Other: This method should be static. This method should use the following system for scoring: 0 – blank 1 – e, a, i, o, n, r, t, l, s, u 2 – d, g 3 – b, c, m, p 4 – f, h,...
Q**Draw a State Transition Diagram for an Automatic Teller Machine (ATM). Your diagram should be able to deal with: Card inserted, reading card, enter PIN, waiting for PIN, Bank Checks PIN, Wait for Authorisation from Bank, Display Accounts, Select Account, Display limits, Wait for Selection, Limit Exceeded, Print Receipt and Dispense Cash. Q**Explain the concept of information hiding
Kindly help me In this assignment you will create a RMI based system that allows a user to do the following: 1) Create a bank account by supplying a user id and password. 2) Login using their id and password. 3) Quit the program. Main Manu of ATM service window *Separate remote methods will be created for all of these functionalities. ->To create account see output below Hi! Welcome to ATM Machine! Please select an option from the menu below: l -> Loginc -> Create New Account q -> Quit > c...