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

Please use visual studio software and display an output for the following questi

ID: 3759745 • Letter: P

Question

Please use visual studio software and display an output for the following question asked ( please)

Question:

Modify the following program illustrated below after the question (required: ShapeAnimator.cpp, SortAnimator.h) in which a Hat class is implemented. (Feel free to come up with any appropriate shape of a hat; you could use two rectangular shapes that are connected.)The main( ) must have an object of the Hat class instantiated to call the draw() member function. The moved( ) member function moves the triangle to top and bottom of the screen.  

Program:   #include '' ShapeAnimator.h ''

int main()

{

Tent tent(ll, 5, 13);

Box box ( 5, 6 5, 4, 7 ) ;

tent.draw();

box.draw();

tent.draw();

box.draw();

for (int k = O; k <= 20; k++)

{ Sleep(75);

tent.move();

box.move(); }

Shape *myShapes[] ={&tent, &box};

ComplexShape cS(myShapes, 2);

cS.setDirection(l, l);

for (int k = O; k < 12; k++)

{ Sleep(75);

cs.move();

}

box.setDirection(O, 1);

for (int k = O; k < 10; k ++) {
}
Sleep(75);

box.move();
}

return 0;

}

Explanation / Answer

#include '' ShapeAnimator.h ''
int main()
{
Tent tent(ll, 5, 13);
Box box ( 5, 6 5, 4, 7 ) ;
tent.draw();
box.draw();
tent.draw();
box.draw();
for (int k = O; k <= 20; k++)
{ Sleep(75);
tent.move();
box.move(); }
Shape *myShapes[] ={&tent, &box};
ComplexShape cS(myShapes, 2);
cS.setDirection(l, l);
for (int k = O; k < 12; k++)
{ Sleep(75);
cs.move();
}
box.setDirection(O, 1);
for (int k = O; k < 10; k ++) {
}
Sleep(75);
box.move();
}
return 0;
}