Question: Your program will read the WA _ EV _ Population.csv file a text file in which data fields are separated by comma. The explanation of

Your program will read the WA_EV_Population.csv filea text file in which data fields are separated by comma. The explanation of data is not needed because you can understand data from header line. The data file will be organized as follows: The first row consists of column headers and should be ignored while processing data but needs to be considered for data types and what each data means. The remaining lines of the file contain the data. Each data row contains data on an EV record. Your EV program will not know in advance the number of data rows present in the file. However, for this homework, you only need to read, process, and output one line at a time, so it should not be necessary for EV program to know the total number of rows in advance.
As EV program reads the data file, there are two operations that must be made about data. First, you need to check whether each record (each row) is unique (not repeated). If EV program encounters a duplicate record/row while reading the data file, it must provide an error message indicating that it encountered a duplicate and the line number at which the duplicate was found, then move on to reading, processing, and outputting the next line in data file. In contrast to EV 0.1, EV 0.2. will read and store all data before sending any output to
System out. Once the data is read in and checked for duplications etc. (as described in Homework 1), EV 0.2 needs to create a recordID as an additional column by combining attributes of VIN and DOL Vehicle ID attributes. If you check the data carefully, DOL Vehicle ID is already unique. However, it is possible (assume) that it might not be unique in the future. However, assuming combination of VIN and DOL Vehicle ID guarantees the uniqueness. Thus, recordID can be a String type rather than a numeric type because of VIN.
At the end, the data will be sent to System out in reverse order and added created recordID at the beginning of each record/row. Note that you do not have to sort the data. EV 0.2 will print them in reverse order, which means the last row/record should be on first, and the first row/record will be last. Also, note that the order of the attributes will remain unchanged. Finally, note that all errors (duplicates, invalids) will be sent to System out before any records are sent there.
Moreover, you need to print the summary of how many lines your program read, how many rows/records in the memory, how many invalid and duplicate records as like (example not correct numbers).
Data lines read: 5505; Records in memory: 4217; Invalid records: 750, Duplicate records:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!