Question: For the program below, write the statements to call set_values using STATIC BINDING and then DYNAMIC BINDING. Identify which is static and which is dynamic

 For the program below, write the statements to call set_values using

For the program below, write the statements to call set_values using STATIC BINDING and then DYNAMIC BINDING. Identify which is static and which is dynamic binding. #include using namespace std; class Polygon {protected: int width, height; public: void set_values (int a, int b) {width=a; height=b;} virtual int area ()=0;};; class Rectangle: public Polygon {public: int area () {return width * height;}}; main () {Rectangle rect; return 0;}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!