#include <iostream> using namespace std; class Sensor { private: int a; // your code here: declare private int value public: void setValue(int v) { a=v; } int getValue(void) { return a; } // your code here: implement setValue and getValue }; int main() { Sensor s; s.setValue(75); cout << "Sensor value: " << s.getValue(); return 0; }
Test Cases
Test Results
Input
Expected Output
Sensor value: 75