Documentation of the  autodata.txt  file


  The file is a space delimited file where the fields can be read most easily with the “Read” function.  A set of macros have been established to make the opening of the file and the reading of the file simplified, thus hiding the intricacies of  C++’s file I/O processes early on, and focusing the student’s  attention of the data fields themselves. 


Record Description:


          char  model  [12]   ;

          int      cyl               ;

          int      doors          ;

          int      colors          ;

          float   msrp            ;

          int      month          ;

          int      year             ;

          float   cust_amt      ;

          int      finance         ;

          int      sales_num    ;


Field Layout



1st field        - A set if chars not exceeding 11 characters in length holding the model name of the automobile.


2nd field        - An integer indicating the number of cylinders in the engine.


3rd field        - An integer indicating the number of doors on the vehicle.  The set of values are 2 and 4 which 

                       are self explanatory, and 8 (extended cab truck) and 9 (a convertible).


4th field        - An integer indicating color of the vehicle.  The set of values are 1 thru 7.


                             1 equates to red                        5 equates to yellow

                             2 equates to blue                       6 equates to orange

                             3 equates to green                     7 equates to black

                             4 equates to white 


5th field        - A float indicating the manufacturer’s suggested retail price of the vehicle – includes all



6th field        - An integer in the range of 1 to 12 indicating the month in which the car was sold.  1 equates to

                       January and 12 equates to December.




7th field        - An integer in the range of  94 to 03  indicating the year in which the car was sold.


8th field        - A float indicating what the customer paid for the vehicle.


9th field        - An integer indicating whether the car was financed or not.


                             0 = Not financed                                          2 = Financed by Citi Bank

                             1 = Financed by Nations Bank                      3 = Financed by Farmer’s Bank


10th field      - An integer indicating which salesman sold the car.


                             101 = Mildred Pascal                                   105 = Henrietta Hopper

                             102 = Sam Gates                                         106 = Florence Kapor

                             103 = Allen Atanasoff                                  107 = Tabatha Wozniak

                             104 = Quencey Kemeny                               108 = Carver Babbage