Answered step by step
Verified Expert Solution
Link Copied!

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 =

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

What is affirmative action?

Answered: 1 week ago

Question

understand the meaning of the terms discipline and grievance

Answered: 1 week ago