Question: A cash register keeps three log files: customers.txt , payments.txt and taxes.txt . Together, the files compose the transactions run on the register. Write some
A cash register keeps three log files: customers.txt payments.txt and taxes.txt Together, the files compose the transactions run on the register.
Write some code that reads the files line by line and displays for each $ Make sure to display when there is bad data in any of the files with a and to display a message if any of the files are missing.
In the case of customers.txt if the line is empty display ; in the case of payments.txt if the line is not a number or is empty display ; in the case of taxes.txt if the line is not a number, is a number but not between and or is empty display
Sample Run everything ok
James Stirling, $
Mark Lucas, $
Sherley Moss, $
Sample Run bad data
James Stirling, $
Mark Lucas, $
Sherley Moss, $
$
Sample Run missing file
Could not open register files.
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
