Question: Revs.csv table [ [ Spreadsheet ] , [ , A , B , c , D , E , F ] , [ 1
Revs.csv
tableSpreadsheetABcDEFSensor Name,Date,Formatted Value,Raw Data,Signal Strength,VoltageRevs : PMrpmRevs : PMrpmRevs : PMrpm
Raw data opened in Notepad
File Edit View
Kensor Name, Date, Formatted Value, Raw Data, Signal Strength, Voltage
Revs : PMrpm
Revs : PMrpm
Revs : PMrpm
Parking.csv
Spreadsheet
tableABcDEFGHSensor Name,Date,Distance,Raw Data,Value,Formatted Value,Signal Strength,VoltageParking Sensor : PMFALSE,No Object,Parking Sensor : PMFALSE,No Object,Parking Sensor : AMTRUE,Object Detected,
Raw data opened in Notepad
Raw data opened in Notepad
Ambient TempHumidity.csv
Ambient TempHumidity.csv
File Edit View
Sensor Name, Date, Raw Data, Humidity, Formatted Value, Voltage
Ambient State TempHumidity: PM @ F
Ambient State TempHumidity: AM @ F
Ambient State TempHumidity: AM @ F
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.csvAmbient TempHumidity.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 containers 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 SensorType 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 SensorType, 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 TempHumidity.csv as another derived class, include the humidity in temperature in as fields.
Convert date and time fields to C objects.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
