Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me code this program using C++ Programming Language: A Gateway communicates with node (Sensors and switches) by sending requests to the nodes, to
Please help me code this program using C++ Programming Language:
A Gateway communicates with node (Sensors and switches) by sending requests to the nodes, to which they react accordingly. It refers to: the query of the state This involves querying the status and The Set of the state setting the status. There are the following nodes: thermometer. State is the measured temperature in degrees Celcius. Simulate this by supplying a random value from (-20, +20) on request. The state cannot be changed by the gateway. Light sensor. The state is the measured brightness in lux. Simulate this by supplying a random value from [0, +12000) on request. The state cannot be changed by the gateway. Switch Status is on or off. The status can be changed with the appropriate commands from the gateway. Initially the switch is off. Implement a menu with which you can query or change the states of the nodes. Work with a light sensor and thermometers and switches each. Show the appropriate unit(e.g. degrees Celsius). 1 Light sensor, 2 thermometers, 2 switches nodes Work with a abstract base class for the proc. Candidates for purely virtual methods are querying and setting the stateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started