Write program in C++. thanks!
CSC326 I. Write a specification for a class called thermostat, that stores and manipulates a simple thermostat. This thermostat has a shutoff point, and then can be set at any degree between 50 and 90. It has one data member (Boolean) which holds whether the thermostat is on or not, and another data member that holds the degree. Two functions examine the status of the thermostat. One tells us whether the thermostat is on or not, and the other tells us on what degree the thermostat is set. If the thermostat is off, the degree at which it is set makes no difference. A function allows us to shut off the thermostat A function allows us to set the thermostat to a specific position. Either make the preconditions of this function that the thermostat is on, or make sure that you check the thermostat and turn it on before changing the temperature. A function allows us to subtract or add degrees by a given amount. Create a class specification and C++ definition that includes both pieces of data and the five functions. 3. 2. Create a header file with the C++ definition, and implement the member functions in members.cpp. Create a main function to test your code. You should declare a variable of type thermostat and then do 4. the following, in function calls. Have a cout statement after each command so that we can see if the class is implemented correctly a) Turn off the thermostat. b) Check to see if it is on/off. c) Set the thermostat to any degree you wish. d) Check to see if it is on/off. e) Set the thermostat to 76. t Check the degrees 8) Raise the thermostat by 2 degrees. h) Check the degrees ) Check to see if it is turned on. i) Lower the thermostat by 8 degrees. k) Check the degrees. I) Turn off the thermostat m) Check to see if it is on/off. Think about: How are you dealing with error checking? What if a user sets the thermostat to 50 and then tries to lowerit by 6 degrees