Question: Question 12 6 pts Classes: Out-of-class Definitions Given the following class which provides only prototypes for its constructor and methods: class Gromit public: long a;
Question 12 6 pts Classes: Out-of-class Definitions Given the following class which provides only prototypes for its constructor and methods: class Gromit public: long a; double b; float c; int d; string e; Gromit(); Gromit(int 1); Gromit(long 13 float dolothing (float f): 3: Which answer DOES NOT correctly implement (define) all the constructors and methods that are represented in the class above? Gromit :: Gromit({} Gromit :: Gromit(long 1){ a = 1; } Gromit :: Gromit(int i) { d = i;} float Gromit:: doNothing(float f) { return f;} Gromit :: Gromit() {} Gromit :: Gromit(long p){ a = a = p;} Gromit :: Gromit(int 9){ d = 4;} float Gromit :: doNothing(float r){ return r;} Gromit :: Gromit() {} Gromit :: Gromit(long p){ a = p;} Gromit :: Gromit(strings) { e = s;} float Gromit :: doNothing(float r){}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
