New Jersey Institute of Technology (NJIT)
Computer and Information Science Department (CIS)
CIS365-001:
File Structures and Management, Fall 1999
Professor: Michael
Bieber
Wednesday, October 13, 1999 at the start of class
(but don't skip class to finish this assignment!)
To learn how to create reports and use formatted editing.
Read Stern & Stern, chapters 6 and 8
Modify your program from homework #2b to create a proper report. The report will include each record in your book master data file from Assignment 2a. Write each record to a new line of the report. Separate each field with some blank spaces. Format the data nicely.
Include some header lines with the company name, report name, and labels for each of the data fields. At the end of the report write a count of the number of records in the file, and the average price of the books.
Instead of printing directly to the printer, write your output to a report file. Later you can open this report file in a word processor and print it from there.
Thus your program will have one input file (the master data file) and one output file (the report file).
Modify your program from homework #2b to create a proper report of the records in your transaction data file. You can choose to write each record to one line or to two lines. (If you use two lines, place a blank line between each record on the report.)
Format the contents nicely, both with good editing formats, and with substitutions. For example, replace "I" by "insert," "D", by "delete," etc. User appropriate header lines. Make the report easy to read. This will take some inventiveness on your part, and probably everybody's reports will look different in the class.
At the end of your report, place a count of the number of records in the file, and the number of each type of record, i.e., the number of insert records, the number of delete records, the number of modify price records and the number of modify type records.
Instead of printing directly to the printer, write your output to a report file. Later you can open this report file in a word processor and print it from there.
Thus your program will have one input file (the transaction data file) and one output file (the report file).
For each part of this assignment, turn in listings of your program, the input file and your report file.
---> Staple these together. Put your name on every page.
This page: http://www.cis.njit.edu/~bieber/CIS365F99/hw4.html