Chapter 2 Exercise 7 (rounding numbers)
I am wondering if anyone else has noticed this and if the edition I am using may not include some needed information.
Exercise 7 (at the end of the chapter, not the programming example earlier in the chapter) asks for the rounding of numbers to the nearest whole number. The solution downloaded from the web site uses the Math::Round() function to round the numbers to be written to the console.
I know a little about C/C++ programming, but am attempting to follow the book using only the concepts presented in the book so far. I reviewed the chapter in an attempt to find a discussion of rounding numbers and found nothing. Therefore I wrote code to manually round the results without the use of any libraries. To my surprise, I found the solution employed Math::Round().
Reading the code in the downloaded solution is intuitive once the existence of the function is known. The issue I have is that the premise of this book is that concepts will be covered on a as needed basis to teach programming in Visual C++. How can a beginner be expected to know how to write the code needed to successfully complete the exercises If the concepts are not covered in the reading material?
Yeah, I know "Google is my friend" for stuff like this, but at this early stage of the book, I don't believe that we should be required to know the proper search parameters and which search result to use as a source for a coding solution to an exercise. This sort of research seems to be much better suited to an advanced programming exercise than a beginner level exercise.
Don't get me wrong. ... I do possess the research knowledge and skills, but to reiterate: I am attempting to confine my solutions to those discussed in the book. I am of the belief that understanding the concepts in the order presented will create a better knowledge base than jumping ahead of the current principles and concepts to write solutions using concepts which have not been covered yet.
drpepper
|