Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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 state

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions