Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ In part 4, you will be focusing on allowing multiple of the four transactions listed below to be completed by the user on one

C++

image text in transcribedimage text in transcribedimage text in transcribed
In part 4, you will be focusing on allowing multiple of the four transactions listed below to be completed by the user on one of the user's accounts: checking or savings. This information must be stored in a struct called Customer. You should have an array of structures. You will include defensive programming and error checking to ensure your program functions like an ATM machine would. The account details for your customer are as follows: Customer Username Password Savings Account Checking Account Robert Brown rbrown blue 123 $2500.00 $35.00 Lisa White Iwhite red456 $500.00 $1250.00 Mark Black mblack green789 $750.00 $200.00 Lee Ann Smith dsmith yellow136 $600.00 $900.00 The information above can be found in the attached file, accounts.dat @. You must read the information from this file to be able to complete the program. For this report, update the program to allow one of the above users at a time to safely log in to their account, complete a maximum of 3 transactions, and end the program. The updated account values must be written to the file after each transaction, Three incorrect attempts at entering the username and password.will end the program. Allow the user to make up to a maximum of 3 transactions at a time. After 3 transactions, the program will terminate. 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. 1 - Deposit (adding money to the account) 2 - Withdrawal (removing money from the account)Robert Brown rbrown blue123 $2500.00 $35.00 Lisa White Iwhite red456 $500.00 $1250.00 Mark Black mblack green789 $750.00 $200.00 Lee Ann Smith dsmith yellow 136 $600.00 $900.00 The information above can be found in the attached file, accounts.dat @. You must read the information from this file to be able to complete the program. For this report, update the program to allow one of the above users at a time to safely log in to their account, complete a maximum of 3 transactions, and end the program. The updated account values must be written to the file after each transaction. Three incorrect attempts at entering the username and password will end the program. Allow the user to make up to a maximum of 3 transactions at a time. After 3 transactions, the program will terminate. 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. 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) Each of the 4 transactions should be defined in its own function. At the end you should have a minimum of 5 functions (including main). You may define additional functions as you see fit. .\f

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_2

Step: 3

blur-text-image_3

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Rationale of PPP Explain the rationale of the PPP theory.

Answered: 1 week ago