#include <iostream>
class ADCSensor {
private:
int offset_val;
public:
// TODO: The offset should be an internal implementation detail.
ADCSensor() : offset_val(100) {}
// TODO: Add a method to process raw values and return calibrated data
int getdata(int raw_value) {
if(raw_value - offset_val < 0) {
return 0;
}
return raw_value - offset_val;
}
};
int main() {
int N;
if (!(std::cin >> N)) return 0;
ADCSensor sensor;
for (int i = 0; i < N; ++i) {
int raw;
std::cin >> raw;
// TODO: Move this logic inside the class.
// TODO: Fix the bug where (raw - offset) can be negative.
int result = sensor.getdata(raw);
std::cout << "Sample: " << result << std::endl;
}
return 0;
}