Programming Exercises

1:Provide method definitions for the class described in review question 5 and write a short program illustrating all the features.
2:Do programming exercise 1 from Chapter 9, but replace the code shown there with an appropriate golf class declaration. Replace setgolf(golf &, const char *, int) with a constructor with the appropriate argument for providing initial values. Retain the interactive version of setgolf(), but implement it using the constructor. (For example, for the code for setgolf(), obtain the data, pass the data to the constructor to create a stemporary object, and assign the temporary object to the invoking object, which would be *this.)
3:Do programming exercise 2 from Chapter 9, but convert the Sales structure ...

Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.