Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is the output of the following program? 1 tinclude kiostreans 2 using namespace std; class Shape { public: virtual void draw() { coutse =
What is the output of the following program? 1 tinclude kiostreans 2 using namespace std; class Shape \{ public: virtual void draw() \{ coutse" = Draw Shapexk"; } void move() \{ coutee" k+ Move Shapeke"; } J: 9 class Triangle: public Shape \{ 10 public: 11 void drayd) \{ coutce"soDraw Triangle*k"; \} 12. void movel) \{ coutee" wp Move Trianglewk"; } 153 14 void Move(Shape *shape) \{ 15 shape-move(): 163 11 void Draw(Shape ishape) \{ shape draw(); 7 int main() Triangle t; Shape os =t; Draw (5): Move (t) : return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started