Question: (C++) Consider the following 2D array of objects: Valve sewer[NS_DIR][EW_DIR]; Class Valve has a data member openPercent representing how open the valve is (range is
(C++) Consider the following 2D array of objects:
Valve sewer[NS_DIR][EW_DIR];
Class Valve has a data member openPercent representing how open the valve is (range is 01, 1=fully open). There is a close(double percent) member function to partially or fully close the valve (range is 01, 1=close fully) and a default constructor that makes the valve fully open.
Match each prototype with a valid argument to the function using the 2D array. Answers may be used more than once. Choose: sewer, sewer[1], sewer[0][2], invalid prototype
a. double measure(Valve* flows);
b. bool isEmpty(Valve drains[NS_DIR][ ]);
c. void openAll(Valve valves[ ]);
d. void reroute(Valve plumbing[ ][ ]);
e. void flushLine(Valve& junction);
f. void clearFatburg(Valve system[ ][EW_DIR]);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
