Question: Revs.csv table [ [ Spreadsheet ] , [ , A , B , c , D , E , F ] , [ 1

Revs.csv
\table[[Spreadsheet],[,A,B,c,D,E,F],[1,Sensor Name,Date,Formatted Value,Raw Data,Signal Strength,Voltage],[2,Revs -888581,09/14/20223:24 PM,1757rpm,1757,83,14.4],[3,Revs -888582,09/14/20223:14 PM,1337rpm,1337,85,14.2],[4,Revs -888583,09/14/20223:04 PM,3033rpm,3033,94,14.4]]
Raw data (opened in Notepad)
File Edit View
Kensor Name, Date, Formatted Value, Raw Data, Signal Strength, Voltage
Revs -888581,09/14/20223:24 PM,1757rpm,1757,83,14.4
Revs -888582,09/14/20223:14 PM,1337rpm,1337,85,14.2
Revs -888583,09/14/20223:04 PM,3033rpm,3033,94,14.4
Parking.csv
Spreadsheet
\table[[,A,B,c,D,E,F,G,H],[1,Sensor Name,Date,Distance,Raw Data,Value,Formatted Value,Signal Strength,Voltage],[2,Parking Sensor -751490,09/14/20221:59 PM,0,FALSE,0,No Object,99,14.7],[3,Parking Sensor -751491,09/14/20221:52 PM,0,FALSE,0,No Object,100,14.5],[4,Parking Sensor -751492,09/14/202211:52 AM,43,TRUE,1,Object Detected,82,14.6]]
Raw data (opened in Notepad)
Raw data (opened in Notepad)
Ambient Temp_Humidity.csv
Ambient Temp_Humidity.csv
File Edit View
Sensor Name, Date, Raw Data, Humidity, Formatted Value, Voltage
Ambient State - Temp/Humidity,09/14/20221:50 PM,"35.67,11.1,26.06,58.6,14.6",35.67,35.67% @ 78.9 F,14.6
Ambient State - Temp/Humidity,09/14/202211:50 AM,"23.49,11,18.72,58.1,14.3",23.49,23.49% @65.7 F,14.3
Ambient State - Temp/Humidity,09/14/20229:50 AM,"39.49,10.8,21.71,57.2,14.3",39.49,39.49% @ 71.1 F,14.3
The example output below (included as Output.json) shows how the first three entries of the Revs.csv file should be converted with the date, revs signal strength and voltage data extracted but other information discarded. It is not necessary to include the sensor type for the basic requirements but it is for the intermediate and advanced.
Task
You are required to implement a solution that extracts the data from the Revs.csv (and optional Parking.csv/Ambient Temp_Humidity.csv) file and outputs a .json formatted text file in the format described above. This leads to the basic requirements but further enhancements as described below will lead to more marks being awarded.
Basic
Read date, revs, signal strength and voltage data from Revs.csv.
Store in a suitable container(s) with a custom struct that has matched data types
Output to a correctly structured .json file named Output.json.
Intermediate
Define stored data items as a custom object class instead of a struct
Convert the date into a date and time with a consistent format.
Include parking data from Parking.csv. You will need to add an extra field called Sensor_Type for both types of sensor alongside a Boolean for motion detection and some form of number for distance with the parking data.
Advanced
Define a base class for a generic sensor containing Sensor_Type, date and voltage.
Separate each sensor type as a derived class that inherits from the base class
Include temperature and humidity sensor data (from Ambient Temp_Humidity.csv) as another derived class, include the humidity in %, temperature in C as fields.
Convert date and time fields to C++ objects.
Revs.csv \ table [ [ Spreadsheet ] , [ , A , B ,

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 Programming Questions!