Access the entire Solution Manual for Problem Solving with C++ 10th Edition Savitch instantly with a one-click PDF download.
Access the entire Solution Manual for Problem Solving with C++ 10th Edition Savitch instantly with a one-click PDF download.
com
http://testbankbell.com/product/solution-manual-for-problem-
solving-with-c-10th-edition-savitch/
OR CLICK HERE
DOWLOAD NOW
https://testbankbell.com/product/solution-manual-for-data-abstraction-
and-problem-solving-with-c-walls-and-mirrors-7th-editioncarrano/
testbankbell.com
https://testbankbell.com/product/solution-manual-for-data-structures-
and-problem-solving-using-c-2-e-mark-a-weiss/
testbankbell.com
Solution Manual for Succeeding in Business with Microsoft
Excel 2010 A Problem-Solving Approach, 1st Edition
https://testbankbell.com/product/solution-manual-for-succeeding-in-
business-with-microsoft-excel-2010-a-problem-solving-approach-1st-
edition/
testbankbell.com
https://testbankbell.com/product/solution-manual-for-succeeding-in-
business-with-microsoft-excel-2013-a-problem-solving-approach-1st-
edition/
testbankbell.com
Test Bank for Data Abstraction & Problem Solving with C++:
Walls and Mirrors, 6/E, Frank M. Carrano, Timothy Henry
https://testbankbell.com/product/test-bank-for-data-abstraction-
problem-solving-with-c-walls-and-mirrors-6-e-frank-m-carrano-timothy-
henry/
testbankbell.com
https://testbankbell.com/product/absolute-c-6th-edition-savitch-
solutions-manual/
testbankbell.com
https://testbankbell.com/product/solution-manual-for-data-abstraction-
and-problem-solving-with-java-walls-and-mirrors-3-e-3rd-
edition-0132122308/
testbankbell.com
Solution Manual for Problem Solving
with C++ 10th Edition Savitch
Full download chapter at:
https://testbankbell.com/product/solution-manual-for-problem-
solving-with-c-10th-edition-savitch/
PROBLEM
SOLVING
WITH
C++
Tenth Edition
Walter Savitch
UNIVERSITY OF CALIFORNIA, SAN DIEGO
http://www.pearsonhighered.com/savitch/
and please visit our general computer science and engineering web site at:
http://www.pearsonhighered.com/cs/
Copyright © 2018 by Pearson Education, Inc.
All right reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photo-copying, recording, or any
other media embodiments now known or hereafter to become known, without the prior written
permission of the publisher. Manufactured in the United States of America.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where these designations appear in this book, and the publisher was aware
of a trademark claim, the designations have been printed in initial caps or all caps.
The programs and the applications presented in this book have been included for their
instructional value. They have been tested with care but are not guaranteed for any particular
purpose. The publisher does not offer any warranties or representations, nor does it accept any
liabilities with respect to the programs or applications.
Chapter 7 Arrays
Chapter 14 Recursion
Chapter 15 Inheritance
Chapter 17 Templates
Chapter 1
This document is intended to be a resource guide for instructors using Savitch, Problem Solving with
C++. This guide follows the text chapter by chapter. Each chapter of this guide contains the
following sections:
1. Solutions to, and remarks on, selected Programming Projects
2. Outline of topics in the chapter
3. General remarks on the chapter
***********************************************************************
// Ch1 Programming Project 3.cpp
//
// This program calculates the monetary value of a number of
// quarters, dimes, and nickels.
//
***********************************************************************
#include <iostream>
// ====================
// main function
// ====================
int main()
{
int quarters, dimes, nickels, total;
// Input coins
cout << "Enter number of quarters." << endl;
cin >> quarters;
6
Copyright © 2018 Pearson Education, Inc.
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 10e Chapter 1
#include <iostream>
using namespace std;
int main()
{
int ACCELERATION = 32;
cout << "\nThe object will fall " << distance << " feet in "
<< time << " seconds.\n";
return 0;
}
7
Copyright © 2018 Pearson Education, Inc.
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 10e Chapter 1
There seem to be three major approaches to teaching C++ as the first course in programming. In the
one approach, classes and objects are done very early, frequently with a library of some sort that
must be used with the text. In another, all of the ANSI C subset of C++ is covered prior to even
mentioning classes or objects. This text takes a third road that is more middle of the road. Here,
enough of the control constructs and functions are covered prior to doing classes and objects.
However, reorderings of the chapters are possible that allow any of these approaches.
Here is a "classes early" course that follows the text closely. This outline assumes no background in
computing. Topics beyond Chapter 11 may be studied as time permits.
Day days allotted
1 1 Startup business
2-3 2 Chapter 1: Introduction to Computers
4-8 5 Chapter 2: C++ Basics. If the students have programming experience, the time
spent can be significantly reduced.
9-11 3 Chapter 3: Flow of control
12-14 3 Chapter 4: Procedural Abstraction
Test 1
16-18 3 Chapter 5: Functions for all subtasks
19-22 4 Chapter 6: I/O Streams
23-27 5 Chapter 7: Arrays
Test 2
29-32 4 Chapter 8: Strings and Vectors
Chapter 9: Pointers and Dynamic Arrays
33-37 5 Chapter 10: Classes
38-41 3 Chapter 11: Friends and Overloaded Operators
Test 3
5 Chapter 12 Separate compilation and namespaces
3 Chapter 13 Pointers and Linked Lists
3 Chapter 14: Recursion
3 Chapter 15: Inheritance
3 Chapter 16: Exception Handling
3 Chapter 17: Templates
2 Chapter 18: Standard Template Library and C++11
Reorderings:
The author suggests a reordering in the preface that allow almost all of ANSI C (with the tighter
C++ type-checking) to be covered before classes. Several variants on this reordering that allow
classes a bit earlier are presented in the text. The author describes interdependency of the chapters
in the preface of the text. Other reorderings are certainly possible.
8
Copyright © 2018 Pearson Education, Inc.
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 10e Chapter 1
Chapter 1:
The student should do all the programming assignments in this chapter. These teach the locally
available program development system and familiarize the student with some of the more
common compiler errors. Error messages are quite specific to the compiler being used. It is very
important that the student learn these ideas as early as possible.
This chapter serves as an introduction to computers and the language of computers for those
students who have no computer experience. The terminology is very important. Many students
only want to learn how the programming language works, and seem to be unhappy when they
find that they are required to learn the terminology associated with the language. The students
who learn the terminology have less trouble by far with this course.
Students should be given an indication of the amount of work that must be done before coding
begins. There are instances where several man-years of work have gone into software before a
single line of code was written.
Emphasize the importance of the problem-solving phase of program design. This will save the
student work in the long run. It is further important to emphasize that the problem definition and
algorithm design phases may need correcting once the actual coding and testing is in process. This
is true even if the algorithm was carefully desktop tested. Emphasize that the program design
process is an 'iterative' process. You make a start, test, correct and repeat until you have a solution.
It is a fact that the sooner the coding is started (on most problems), the longer the problem will take
to finish. My students insist on learning this the hard way. The algorithm design can be given a
boost by dividing the problem definition into INPUT, PROCESS, OUTPUT phases. The algorithm
will be primarily concerned with PROCESS, but frequently just getting information into the
computer, or out of the computer in a desirable format is a significant part of the task, if not the
whole problem.
In the text, Section 1.4, subsection "Kinds of Program Errors", there is a discussion of compiler error
messages. The error message from g++ when the wrong operator << or >> is used for input or
output, is something like errormessage.cpp:8: no match for `_IO_ostream_withassign & >> int. The
point is that compiler error messages are not clear, and anything your can do to help students to
associate error messages with errors that cause them will help the student to gain some intuition in
debugging based on compiler messages.
9
Copyright © 2018 Pearson Education, Inc.
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 10e Chapter 1
Encourage students to put only one statement per line. When errors are made, as they inevitably
are, the compiler is better able to tell us which is the offending statement. The cost is little for the
convenience gained in ability to find errors. The student should take compiler warnings to heart. If
the compiler warns about something, and the student is not absolutely certain what the message is
warning about, the student should treat the warning like the error that it probably is. The bottom
line is that all warnings (in the first course, at least) should be treated as errors. Compilers vary
with respect to what is reported as an error and what is reported with a warning. The GNU project
C++ compiler, g++ is more permissive by default. Encourage your students to compile using
10
Copyright © 2018 Pearson Education, Inc.
Exploring the Variety of Random
Documents with Different Content
TEMPO
An oriole whistles;
My bird has not a note,
Though I can see the song
Trembling in his throat.
Transcriber’s Notes:
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.