Define a simple C++ class named GpioPin.
Class Requirements:
The class should contain:
0 represents LOW1 represents HIGHConstructor Requirements:
0 (LOW)Member Functions:
void write(int value)0 or 1int read()In main() Function:
pininitialValuefinalValueGpioPin object using the default constructorwrite(initialValue)write(finalValue)read()Input Format:
pin
initialValue
finalValue
pin is a non-negative integerinitialValue and finalValue are always 0 or 1Output Format:
GPIO Pin <pin number> State <pin state>
Example Input:
13
0
1
Example Output:
GPIO Pin 13 State 1
Constraints:
Input
13 0 1
Expected Output
GPIO Pin 13 State 1