Can someone help with these two C++ programming? 1. The class Chimney represents
ID: 640656 • Letter: C
Question
Can someone help with these two C++ programming?
1. The class Chimney represents a smoke ventilation system. Consider the class diagram shown below.
Each instance of a Chimney has a height, a shape and can be either opened or closed. Here is the class definition (.h)
Chimney( );
void open();
void close();
bool isOpen() const;
void setHeight( double height );
double getHeight() const;
bool isOpen;
double myHeight;
Based on the information shown here, a possible implementation (.cpp) for Chimney is shown below.
isOpen = false;
myHeight = 0;
isOpen = true;
isOpen = false;
return( isOpen );
myHeight = height;
return( myHeight );
In addition, create these two operations on Fireplace :
(1)void Fireplace::light();
(2)void Fireplace::extinguish();
These operations should adjust the Fireplace by manipulating the Chimney, opening the chimneystack
before the Fireplace
void open();
void close();
bool isOpen() const;
void setHeight( double height );
double getHeight() const; bool isOpen;
double myHeight; // in feet class Chimney {
public:
Chimney( );
void open();
void close();
bool isOpen() const;
void setHeight( double height );
double getHeight() const;
bool isOpen;
double myHeight;
Explanation / Answer
images missing ..please upload the whole question..!