Question

In: Accounting

Your final project will satisfy the following scenario: You are writing a program that will act...

Your final project will satisfy the following scenario:

You are writing a program that will act as an ATM machine by the end of this course. In order to access the ATM, the customer must enter their user name and their passcode. After 3 incorrect attempts at entering the user name and password, the program will end. The list of legitimate users along with their user ID, passcode, and account balance will be provided to you.

There are only 5 functions that can be carried out by the ATM:

1 – Deposit (adding money to the account)

2 – Withdrawal (removing money from the account)

3 – Balance Inquiry (check current balance)

4 – Transfer Balance (transfer balance from one account to another)

5 - Log Out (exits/ends the program)

Allow the user to make up to a maximum of 3 transactions at a time. After 3 transactions, the program will terminate. Each transaction cannot exceed $500; for example, a user cannot withdraw more than $500.00, if there is $500.00 available on their account. After a transaction is completed, the program will update the running balance and give the customer a detailed description of the transaction. A customer cannot overdraft on their account; if they try to withdraw more money than there is, a warning will be given to the customer. Also, note that the ATM doesn’t distribute or collect coins – all monetary values are in whole dollars (e.g. an integer is an acceptable variable type). Any incorrect transaction types will display an appropriate message and count as a transaction.

Customer Username Password Savings Account Checking Account
Robert Brown rbrown blue123 $2500.00 $35.00
Lisa White lwhite red456 $500.00 $1250.00
Mark Black mblack green789 $750.00 $200.00
Khizzy Junior khizzyjr 3163 $600.00 $900.00

Final Project Part 1: The Raptor program should do the following:

  • Create an executable flowchart using Raptor to support your solution to the problem. Your flowchart must use a modular design. (This should be your M07 Evaluate – Progress Report 5.)
  • Implement a menu-driven program to help assist the customer.
  • Incorporate defensive programming to make sure that the user is inputting valid data.
  • Use at least one array to capture the account information for each customer. Use correctly nested loops to allow customers to do multiple transactions.
  • With good programming style, code the program using Raptor in a way that enhances readability and ease of use, including the appropriate use of internal documentation (comments) and external documentation (user-friendly outputs).

Final Project Part 1: The Raptor program should do the following:

  • Create an executable flowchart using Raptor to support your solution to the problem. Your flowchart must use a modular design. (This should be your M07 Evaluate – Progress Report 5.)
  • Implement a menu-driven program to help assist the customer.
  • Incorporate defensive programming to make sure that the user is inputting valid data.
  • Use at least one array to capture the account information for each customer. Use correctly nested loops to allow customers to do multiple transactions.
  • With good programming style, code the program using Raptor in a way that enhances readability and ease of use, including the appropriate use of internal documentation (comments) and external documentation (user-friendly outputs).

Solutions

Expert Solution

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
class custaccount
{
public:
string name;
long passcode;
double accountno;
custaccount()
{
cout<<"Enter number:"; cin>>name;
cout<<"Enter Passcode:";cin>>passcode;
cout<<"Enter accountno;"; cin>>accountno;
}
bool authenticate(string custname,int pass_code)
{
string custname;
long passcode;
int i=0;
cout<<"Enter Name:";cin>>custname;
for(i=0;i<=20;i++)
{
cout<<"Enter passcode:";cin>>pass_code;
int flag=0,j=0;
for(j-0;j<=20;j++)
{
if(pass_code==passcode)
{
flag=1;
}
else
{
flag-=0;
}
}
if(flag==1)
{ int i=0,j=0;
for(j=0;j<=20;j++)
{
if (cust_name=name[i])
{flag1=1;
exit(0);
}
else
{
flag1==0;
exit(0);
}
}
flag1=0;
}
else
{
flag1==0;
}
return flag1;
}
}
};
void deposit(long amt,long accountno,string custname)
{
accontq1=accountno;
custnam=custname;
if(authenticate(accontq1,custname))
{ long depositsum;
cout<<"Enter amount you want to deposit:";cin>>depositsum;
accountsum+=depositsum;
return 0;
}
void withdrawl(long amt, long accountno, string custname)
{
accontq1=accountno;
custnam=custname;
If(authenticate(account1,custnam))
{ long withdrawlsum;
cout<<"Enter amount you want to deposit:";cin>>withdrawlsum;
accountsum-=withdrawlsum;
}
else
{
Return 0;
}
}
void balanceenquiry(long accountno)
{
custaccount a1;
int flag=0;
int I;
for(i=0;i<=20;i++)
{
if a1[i].account_no==accountno)
{
cout<<"Balance=";<<a[i].accountsum;
flag=1;
}
else
{
flag=0;
}
}
if(flag==0)
{
cout<<"account invalid:";
}
}
}
}
void transferbalance(long sendac, long recac, double accsum)
{
custaccount a1;
a1[sendac].accountsum-accsum;
a1[reccac].accountsum+=accsum;
return 0;
}
int main()
{
int accountno, passcode;
Cout<<"Enter accountno"; cin>>accountno;
cout<<"Enter passcode"; cin>>passcode;
If(authenticate(accountno,passcode)
{ int choice;
cout<<"Enter your choice 1. Withdrawl 2. Deposit 3. Balance enquiry 4. Long out:"; cin>> choice;
switch(choice)
{
case'1': custaccount[accountno].withdrawl(amt);break();
case'2': custaccount[accountno].deposit(amt);break();
case'3':custaccount[accountno].balanceenquiry(accountno);break();
case'4': cout<<"You are logged out:";exit(0);
}
}
else
{
cout<<"Invalid AccountNo."; exit(0);
}
return 0;
}


Related Solutions

***USING JAVA Scenario: You will be writing a program that will allow a user to find...
***USING JAVA Scenario: You will be writing a program that will allow a user to find and replace misspelled words anywhere in the phrase, for as many words as the user wishes. Once done (see example runs below), the program will print the final phrase and will show the Word Count, Character Count, the Longest Word and the Shortest Word. Requirements: Do not use Arrays for this assignment. Do not use any String class methods (.phrase(), replace methods, regex methods)...
writing a program that will act like an ATM machine by the end of this course....
writing a program that will act like an ATM machine by the end of this course. In order to access the ATM, the customer must enter their user name and their passcode. After 3 incorrect attempts at entering the user name and password, the program will end. The list of legitimate users along with their user ID, passcode and account balance will be provided to you. There are only 5 functions that can be carried out by the ATM: 1...
This project involves writing a program to calculate the terms of the following sequence of numbers:...
This project involves writing a program to calculate the terms of the following sequence of numbers: 0 1 1 3 5 11 21 43 … where each term is twice the second previous term plus the previous term. The 0th term of the sequence is 0 and the 1st term of the sequence is 1. The example below shows how to calculate the next sequence term: Current sequence: 0 1 Calculate next term: 2 * 0 + 1 = 1...
For this writing task, you'll need to respond to the following scenario: Who are you? You...
For this writing task, you'll need to respond to the following scenario: Who are you? You work as department head in the information technology (IT) department at First Federal Bank. Part of your job is to conduct an ongoing assessment of risk for the institution and to recommend proper controls. Banking systems should be able to quickly collect and edit information, summarize results, and promptly correct any errors. You have identified a possible threat to "timeliness" of information. You have...
In your final project you will be presenting your understanding of certain components of a Management...
In your final project you will be presenting your understanding of certain components of a Management Information System for an existing business. In order to complete this process, you will need to choose a company/industry and research the specific Management Information System of that company. Select a company of that you are familiar with or you feel is relevant in today’s business world. Discuss why you have selected that company and provide a brief synopsis of what the company does...
For the second phase of your final project, you will provide the functionality to your command...
For the second phase of your final project, you will provide the functionality to your command interpreter. In this phase, you will add the functionality for command recognition and implement the HELP, QUIT, COPY, LIST, CD, SHOW and RUN functions. Recall that some commands have no arguments, some have one and some have two and so your interface must handle a variable number of parameters. Your command interpreter should do the following. Display a prompt for the user. Read the...
Answer this question on a new project. Use comments to explain how your program works, final...
Answer this question on a new project. Use comments to explain how your program works, final cpp to be uploaded just like you do the assignments. A box of biscuit is able to hold 10 biscuits, A container is capable of holding 25 boxes (equivalent to 250 biscuits), and A truck is capable of moving 5 containers (equivalent to 1250 biscuits). Write a C++ program that takes in an order of biscuits as input, determines and outputs the following; how...
Scenario For this final project, put yourself in the role of a security analyst who is...
Scenario For this final project, put yourself in the role of a security analyst who is performing an audit of your company. Your organization is a mid-sized manufacturing company that released its own smart headset. The headset has the ability to project important documents on an optical screen for the technicians in the field. The documents could be product schematics, invoices, emails, text messages, or any documents put in the shared drive on the server. The headset has constant communication...
In the second milestone of your final project, you will complete your pre-opening strategy. You must...
In the second milestone of your final project, you will complete your pre-opening strategy. You must analyze the cost behaviors and systems of your industry and then conduct the relevant financial calculations to determine appropriate costing solutions. Be sure to use your work from Milestone One to inform your analysis and proposals. Scenario: Prior to Opening, Part II: Your market research indicated the following price ranges as optimal for your area: Dog Day Care o With pricing at $18 per...
You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your...
You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your program will use two constant strings. One will represent the code for encryption: going from the original message (called the plaintext) to the encrypted version of the message. The other will be “abcdefghijklmnopqrstuvwxyz” (the lowercase alphabet. Your program will ask the user whether they want to 1) encrypt a message, 2) decrypt a message, or 3) quit. If they choose encrypt or decrypt, you...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT