Question
1.This program tests the concepts of: o File Streams o Classes 2. Problem: - You have been hired by a bank to create a program
o File Streams
o Classes
2. Problem: -
You have been hired by a bank to create a program that will process transaction logs "
The banks transactions logs are in the format: *
Header row is first line of the file, line starts with a # character
#CustomerNumber Customer Name .
Each row after that is a "transaction" .
Char Char Double
o First column is
S= Savings
C = Checking
B = Both savings an checking
o Second column is action
D = Deposit
W= Withdrawal
I = Interest rate change (APR changed, no change to balances)
P = Interest posted to account
X Transfer money from the FIRST COLUMN account to the other
For Example, if the log line has:
C X 50.00
This transaction transfers $50 from Checking into Savings o
Third colunn is the amount of money or interest rate that the transaction acts on. If the action is P, this number will be , since it is not used .
If insufficient funds to complete a withdraw or transfer, $10 is subtracted from the account instead. This means that accounts can go negative!
3. Coding requirements:
Classes are required .
A class for Account .
this object will store as private data fields
o balance
o annual percentage rate interest) .
Minimum Actions
o Deposit
o Withdraw
o Transfer
o Post Interest
o Set the annual percentage rate
o Get the balance .
A class for BankCustomer
this object will store as private data fields
o Savings account (using Account)
o Checking account (using Account)
o Customer Number
o Customer Name .
Minimum Actions:
o Get customer name
o Get customer number
o Get Savings balance
o Get Checking balance
o processTransationLog
- Filename of log should be passed to this function .
- Function should return the number of transactions processed
transaction log files that are going to be used for the input as it is required that the output should match the given sample outputs
It should be: file with the main function
File with the class definition
File with the class implementation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started