Question: in c programming Scope: Files Banking application. Create a Start menu with the following options. Open Account Login Exit Create a Main menu with the
in c programming Scope: Files
Banking application.
Create a Start menu with the following options.
Open Account
Login
Exit
Create a Main menu with the following options:
Check Balance
Deposit
Withdraw
Show transactions
Exit
Create structures to support the following information:
Owner name
Password
Account balance
Transaction Count
Transaction amount
Starting Balance
Ending Balance
Behavior:
Open Account
a Get the user name & password, how much they are opening the account with.
Transaction Count starts at
b Launch Main menu, use this new account as context.
Login
a Ask for account name and password.
b Load the account details from the file with that account name.
i If the file does not exist, or the password does not match, tell them invalid
usernamepassword
c Launch the Main menu, use this account as the context.
Check Balance
a Show current balance.
Deposit
a Ask the user how much to deposit positive amount only
b Add the amount to the balance and show the new balance.
c Create a transaction record.Withdraw
a Same as deposit, but reduce the balance.
Show Transactions
a Show all the transactions for this account.
Transaction Behavior.
When making a transaction, that record is saved to the transactions file for that account.
Files:
There are two types of files.
Account Info
Holds onto information, such as balance and password
Transaction Details
Holds the transactions for a specific account.
File Structures Recommended
Account
Name.info
a Password
b Balance
Account Name.tran
a Starting Balance
b Transaction Amount
c Ending Balance
Example Files
File name:
Bob.info
File contents:
P@s$Wrd
File name:
Bob.tran
File contents:
First value is the starting amount, nd is the transaction amount, third is the balance after. The
first record is the amount the account is opened with, so we started at and opened the
account with $ The nd line we had $ deposited $ ending with $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
