Design and implement a simple Embedded C++ class that models a calibrated sensor.
You must define a class named Sensor that stores raw sensor readings and applies a calibration offset before reporting the final value.
Requirements
Sensor.int rawValue — stores the most recent raw sensor reading.int offset — stores the calibration offset.void setRaw(int value)void calibrate(int off)int read()rawValue + offset).Sensor object.setRaw() using the initial raw value.calibrate() using the offset.setRaw() again using the new raw value.read().
Input Format
Three signed integers provided via standard input, each separated by a newline:
raw
offset
newRaw
Output Format
A single integer printed to standard output:
calibrated_value Example Input
100
-5
120
Example Output
115
Explanation
The final calibrated reading is:
120 + (-5) = 115Constraints
rawValue and offset must be private.int behavior.
Input
100 -5 120
Expected Output
115