Question: 2. Consider the class declaration below. Which class methods will be invoked by the following statements that may be coded in a main function? Explain
2. Consider the class declaration below. Which class methods will be invoked by the following statements that may be coded in a main function? Explain the reason each of the constructor you have chosen will be invoked? (a) Golfer nancy; b) Golfer luluLittle Lulu"); (c) Golfer *par new Golfer(nancy); class Golfer private: char *fullname; int games, scores; public: GolferO: Golfer(const char *, int g = 0)://#2 Golfer(const Golfer &); //#3 -GolferO: //#1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
