This project is a parser created for a C++ programming class that takes in a CSV file, specifically that which contains data for restaurant inspections, and maps this data to classes for analysis later. Once the CSV file is parsed, the program groups the cases by zip code and then orders the set by number of failures. Sets with the same number of failures are ordered by the date of their last failed inspection.
Below is the header for the restaurant class, which held the data that was stored in each column of the CSV file:
An instance of the location data class held data for the cases found in its corresponding zip code. This class was used to structure data so that I can sort it later once all the cases were placed into location data instances:
Data from the CSV file was handled using the ifstream class, which read through the file row by row. Once all the data had been read in, the data was sorted using the following strategy: