Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Class Diagram Class Definition (.h file) Chimney Chimney( );
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;

private:

bool isOpen;
double myHeight;

};

Explanation / Answer

images missing ..please upload the whole question..!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote