Question: c++ Given the following program segment as shown in Program A-6. Determine which line of code implements the concept the overridden method. 1 // Program
Given the following program segment as shown in Program A-6. Determine which line of code implements the concept the overridden method. 1 // Program A-6 3 class Based protected: int data; 6 public: Base (int d): data (d) {] 8 void set (int d) {data d; ) 9 virtual void set() { data = 0; } 10 }; 11 class Derived: public Basel 12 public: 13 Derived (string n) : Base (n) { 14 void set (int d) {data = dd;} 15 void set() { cin >> data; } 161; Line 15 Line 9 Line 8 Line 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
