------------------------------------------------------------
CSIS 2610 Lab 7 Strings, char Strings, Files, Pointers
------------------------------------------------------------
Purpose
------------------------------------------------------------
This program will give you experience and practice with:
Working with strings and char strings
Using input and output files
Working with pointers
This is a batch modification of Lab 5.
------------------------------------------------------------
Input
------------------------------------------------------------
The input to your program is a series of records of the form:
A char customer name, CustomerName [20] then on the next line
A string customer address, string Address then on the next line
A float initial deposit, Principle and
A float interest rate, InterestRate and
An int number of years, Years
The dummy record to indicate end of file will have Last One as the name
All of these records already live in the file called customer.data
------------------------------------------------------------
Processing
------------------------------------------------------------
Your program must accomplish the following processing:
Same as Lab 5, with the following exceptions:
You are reading from the input file, so there is no need to prompt the
user for input.
Once the Years are read in, immediately assign Years to
int * YearsPointer;
and use YearsPointer (properly, of course!!) in ALL calculations
that involved Years in Lab 5.
Output will NOT go to the screen, but rather to file customer.report
------------------------------------------------------------
Output
------------------------------------------------------------
For the sample input
Rick Gaydos
307 C Meshel Hall
1000 .06 4
Your output should look like this, with
the first scale line displaying on line one of the file:
1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890
Customer Address Principle Rate Years
Rick Gaydos 307 C Meshel Hall 1000.00 .06 4
Year Value at End of Year
1 1060.00
2 1123.60
3 1191.02
4 1262.48
---------------------------------------
Notice that the customer info is now on ONE line instead of FOUR!
Notice that after the Lab 5 output you must ADD THREE MORE LINES:
a blank line
a line of dashes and
another blank line
after EACH transaction in the customer.report file.
These three lines will separate transactions.
The official test input will be provided on lab day.
------------------------------------------------------------