Question: Consider the following class and answer the questions 1 class myClass { 2 Private: 3 double a: 4 double b: 5 double c: 6 Public:
Consider the following class and answer the questions 1 class myClass { 2 Private: 3 double a: 4 double b: 5 double c: 6 Public: 7 myClass(double x, double y, double z) { 8 a = x: 9 b = y: 10 c = z: 11 } 12 double average () { 13 return (a + b + c)/3.0: 14 { 7.a Write the function prototype of average. Answer: 7.b Modify average to make it constant function Answer: 7.c Modify average to make it virtual. Answer: 7.d Modify average to make it pure virtual. Answer: 7.e Modify average to make it constant and pure virtual
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
