did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780619064730

An Introduction to Programming With C++

by
  • ISBN13:

    9780619064730

  • ISBN10:

    0619064730

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2003-04-03
  • Publisher: Course Technology
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $63.95

Summary

Offer your students a comprehensive introduction to programming using C++ as the illustrative language! By actively working through this tutorial-based, hands-on text, students will gain confidence knowing that they have mastered essential C++ skills and techniques.

Table of Contents

Preface xiii
Read This Before You Begin xvii
Overview
An Overview of a Microcomputer System
1(594)
An Introduction to a Microcomputer System
2(1)
An Overview of Hardware and Software
2(5)
Peripherals
3(1)
Internal Memory
3(1)
The Central Processing Unit
4(1)
Types of Software
5(1)
Mini-Quiz 1
6(1)
A Brief History of Programming Languages
7(4)
Machine Languages
7(1)
Assembly Languages
8(1)
High-Level Languages
8(1)
Procedure-Oriented High-Level Languages
8(1)
Object-Oriented High-Level Languages
9(2)
Mini-Quiz 2
11(1)
Summary
11(1)
Answers to Mini-Quizzes
12(1)
Questions
12(2)
Exercises
14(1)
An Introduction to Control Structures
15(22)
Concept Lesson
16(1)
Defining Control Structures
16(1)
The Sequence Structure
16(1)
Mini-Quiz 1
17(1)
The Repetition Structure
17(2)
The Selection Structure
19(2)
Mini-Quiz 2
20(1)
Summary
21(1)
Answers to Mini-Quizzes
21(1)
Questions
21(2)
Exercises
23(2)
Application Lesson
25(1)
Using the Control Structures
25(1)
Programming Rob the Mechanical Man
25(6)
Exercises
31(6)
Beginning the Problem-Solving Process
37(36)
Concept Lesson
38(1)
Problem Solving
38(1)
Solving Everyday Problems
38(2)
Creating Computer Solutions to Problems
40(1)
Analyzing the Problem
41(3)
IPO Charts
41(2)
Mini-Quiz 1
43(1)
Planning the Algorithm
44(6)
Hints for Writing Algorithms
47(2)
Mini-Quiz 2
49(1)
Desk-Checking the Algorithm
50(2)
The Gas Mileage Problem
52(2)
Mini-Quiz 3
54(1)
Summary
54(1)
Answers to Mini-Quizzes
55(2)
Questions
57(3)
Exercises
60(2)
Application Lesson
62(1)
Using the First Steps in the Problem-Solving Process
62(1)
The Problem Specification
62(1)
Analyze the Problem
62(1)
Planning the Algorithm
63(2)
Desk-Checking the Algorithm
65(2)
Exercises
67(6)
Completing the Problem-Solving Process and Getting Started with C++
73(76)
Concept Lesson
74(1)
More on the Problem-Solving Process
74(1)
Variables and Named Constants
75(10)
Selecting a Name for a Memory Location
76(2)
Selecting a Data Type for a Memory Location
78(1)
How Data is Stored in Internal Memory
79(3)
Selecting an Initial Value for a Memory Location
82(1)
Type Casting
83(2)
Mini-Quiz 1
85(1)
Reserving a Named Constant
85(2)
Reserving a Variable
87(1)
Mini-Quiz 2
88(1)
Using an Assignment Statement to Store Data in a Variable
88(2)
Arithmetic Operators
90(2)
Mini-Quiz 3
91(1)
The Console: :Write( ) and Console: :WriteLine( ) Methods
92(2)
The Console: :ReadLine( ) Method
94(2)
Mini-Quiz 4
95(1)
Coding the Algorithm into a Program
96(4)
Desk-Checking the Program
100(3)
Evaluating and Modifying the Program
103(2)
Mini-Quiz 5
104(1)
Summary
105(1)
Answers to Mini-Quizzes
106(1)
Questions
107(3)
Exercises
110(6)
Application Lesson
116(1)
Creating a C++ Program
116(1)
The C++ Programming Language
116(1)
Starting and Customizing Visual Studio .NET
117(4)
Creating a Console Application in Visual C++ .NET
121(6)
Managing the Windows in the IDE
127(1)
Creating a C++ Program
128(4)
Saving a Solution
132(1)
Closing the Current Solution
133(1)
Opening an Existing Solution
133(2)
Building and Executing a C++ Program
135(3)
Locating and Correcting an Error in a Program
138(2)
Printing a C++ Program
140(1)
Making a Backup Copy of a C++ Solution
140(1)
Exercises
141(8)
Value-Returning Functions
149(46)
Concept Lesson
150(1)
Functions
150(1)
Creating Value-Returning Functions
150(3)
Function Header
151(1)
Function Body
152(1)
Mini-Quiz 1
153(1)
Processing a Function
153(9)
Desk-checking Example 1
155(2)
The Scope and Lifetime of a Variable
157(1)
Desk-checking Example 2
157(5)
Mini-Quiz 2
162(1)
Summary
162(1)
Answers to Mini-Quizzes
163(1)
Questions
163(3)
Exercises
166(2)
Application Lesson
168(1)
Using Values-Returning Functions in a C++ Program
168(1)
Analyzing, Planning, and Desk-Checking the Periodic Payment Algorithm
168(4)
Coding the main( ) Function
172(3)
Coding the calcPayment( ) Function
175(3)
The Math::Pow( ) Method
176(2)
Completing the David Liu Program
178(7)
Using a Function Prototype
182(3)
Formatting Numeric Output
185(2)
Exercises
187(8)
Void Functions
195(48)
Concept Lesson
196(1)
More About Functions
196(1)
Creating Void Functions
197(2)
Mini-Quiz 1
198(1)
Passing Variables
199(8)
Passing Variables by Value
199(1)
Desk-Checking Figure 5-3's Program
200(2)
Passing Variables by Reference
202(2)
Desk-Checking Figure 5-8's Program
204(2)
Mini-Quiz 2
206(1)
Passing Variables by Value and by Reference
207(4)
Passing a String Variable to a Function
211(2)
Mini-Quiz 3
212(1)
Summary
213(1)
Answers to Mini-Quizzes
213(1)
Questions
214(3)
Exercises
217(3)
Application Lesson
220(1)
Using Void Functions in a C++ Program
220(1)
Analyzing, Planning, and Desk-Checking
220(4)
Coding the main( ) Function
224(1)
Coding the getInput( ) Function
224(1)
Coding the calculate( ) Function
225(1)
Coding the displayBill( ) Function
226(2)
Completing the Water Bill Program
228(5)
Exercises
233(10)
The Selection Structure
243(42)
Concept Lesson
244(1)
Using the Selection Structure
244(1)
Including the Selection Structure in Pseudocode
245(1)
Drawing a Flowchart of a Selection Structure
246(1)
Coding the Selection Structure
247(1)
Comparison Operators
248(5)
Using Comparison Operators in a Program
250(3)
Mini-Quiz 1
253(1)
Logical Operators
253(6)
Using the Truth Tables
254(2)
Mini-Quiz 2
256(1)
Using Logical Operators in a Program
256(3)
Comparing Strings
259(3)
Using the ToUpper( ) and CompareTo( ) Methods in a Program
260(2)
Mini-Quiz 3
262(1)
Summary
262(1)
Answers to Mini-Quizzes
263(1)
Questions
264(1)
Exercises
265(5)
Application Lesson
270(1)
Using the Selection Structure in a C++ Program
270(1)
Analyzing, Planning, and Desk-Checking
270(2)
Coding the main( ) Function
272(1)
Coding the calcFatInfo( ) Function
273(2)
Completing the Health Club Program
275(4)
Exercises
279(6)
More on the Selection Structure
285(46)
Concept Lesson
286(1)
Nested Selection Structures
286(6)
Another Example of a Nested Selection Structure
290(2)
Mini-Quiz 1
292(1)
Logic Errors in Selection Structures
292(6)
Using a Logical Operator Rather Than a Nested Selection Structure
294(2)
Reversing the Primary and Secondary Decisions
296(1)
Using an Unnecessary Nested Selection Structure
297(1)
Mini-Quiz 2
298(1)
Using the if/else Form to Create Multiple-Path Selection Structures
298(2)
Using the switch Form to Create Multiple-Path Selection Structures
300(5)
Desk-Checking the Grade Program
303(2)
Mini-Quiz 3
305(1)
Summary
305(1)
Answers to Mini-Quizzes
306(1)
Questions
307(2)
Exercises
309(7)
Application Lesson
316(1)
Using the Selection Structure in a C++ Program
316(1)
Analyzing, Planning, and Desk-Checking the Golf Pro Commission Problem
316(2)
Coding the main( ) Function
318(1)
Coding the calcCommission( ) Function
319(2)
Completing the Commission Program
321(2)
Exercises
323(8)
The Repetition Structure
331(46)
Concept Lesson
332(1)
Using the Repetition Structure
332(1)
Pretest Loops
332(5)
Flowcharting a Pretest Loop
335(2)
Using the while Statement to Code the Pretest Loop
337(2)
Mini-Quiz 1
339(1)
Using Counters and Accumulators
339(3)
The Sales Express Program
339(3)
Mini-Quiz 2
342(1)
Counter-Controlled Pretest Loops
342(3)
Using the for Statement to Code a Pretest Loop
345(6)
Example 1 -- Displaying the Numbers 1 Through 3
346(2)
Example 2 -- Calculating and Displaying a Commission
348(1)
Example 3 -- Calculating and Displaying a Bonus
349(2)
Mini-Quiz 3
351(1)
Summary
351(1)
Answers to Mini-Quizzes
352(1)
Questions
353(3)
Exercises
356(5)
Application Lesson
361(1)
Using the Repetition Structure in a C++ Program
361(1)
Analyzing, Planning, and Desk-Checking the Grade Problem
361(3)
Coding the main( ) function
364(1)
Coding the getPointsEarned( ) Function
364(2)
Coding the assignGrade( ) Function
366(2)
Completing the Grade Program
368(3)
Exercises
371(6)
More on the Repetition Structure
377(30)
Concept Lesson
378(1)
Posttest Loops
378(4)
Flowcharting a Posttest Loop
379(3)
Mini-Quiz 1
382(1)
Coding the Posttest Loop
382(2)
Mini-Quiz 2
384(1)
Nested Repetition Structures
384(6)
The Max Beauty Supply Program
385(5)
Mini-Quiz 3
390(1)
Summary
390(1)
Answers to Mini-Quizzes
390(1)
Questions
391(2)
Exercises
393(4)
Application Lesson
397(1)
Using a Nested Repetition Structure in a C++ Program
397(1)
Analyzing, Planning, and Desk-Checking the Multiplication Table Problem
397(2)
Coding the Multiplication Table Algorithm
399(2)
Completing the Multiplication Table Program
401(2)
Exercises
403(4)
Classes and Objects
407(36)
Concept Lesson
408(1)
Programming Methods
408(1)
Object-Oriented Programming
408(3)
Object-Oriented Programming Terminology
408(3)
Mini-Quiz 1
411(1)
Defining a Class in C++
411(4)
The Declaration Section of the Class Definition
411(2)
Mini-Quiz 2
413(1)
The Implementation Section of the Class Definition
414(1)
The Default Constructor
414(1)
Public Member Methods
415(1)
Using the String: :Concat( ) Method
415(1)
Using the Class in a Program
416(3)
Mini-Quiz 3
419(1)
Summary
419(1)
Answers to Mini-Quizzes
420(1)
Questions
420(2)
Exercises
422(4)
Application Lesson
426(1)
Using Classes and Objects in a C++ Program
426(1)
Analyzing the Problems
426(1)
Creating the Rectangle Class
426(5)
Completing the Implementation Section of the Rectangle Class
427(4)
Creating the Terney Landscaping Program
431(4)
Exercises
435(8)
Sequential Access Files
443(54)
Concept Lesson
444(1)
File Types
444(1)
Using Sequential Access Files
444(1)
Using StreamWriter and StreamReader Objects
445(1)
Opening a Sequential Access File
446(3)
Mini-Quiz 1
449(1)
Writing Information to a Sequential Access File
449(6)
Using the PadLeft( ) and PadRight( ) Methods
451(4)
Mini-Quiz 2
455(1)
Reading Information from a Sequential Access File
455(6)
Using the IndexOf( ) Method to Search a String
457(2)
Using the Substring( ) Method to Access Characters Contained in a String
459(2)
Closing a Sequential Access File
461(1)
Mini-Quiz 3
461(1)
The Sales Program
462(3)
Using a try/catch Block
465(3)
Summary
468(1)
Answers to Mini-Quizzes
469(1)
Questions
470(3)
Exercises
473(7)
Application Lesson
480(1)
Using a Sequential Access File in a C++ Program
480(1)
Viewing the Salesperson Class
480(1)
The Flowers Express Program
481(5)
The addRecords( ) Function
483(1)
The displayTotal( ) Function
484(2)
Completing the Flowers Express Program
486(6)
Exercises
492(5)
Arrays
497(42)
Concept Lesson
498(1)
Using Arrays
498(1)
One-Dimensional Arrays
498(2)
Storing Data in a One-Dimensional Array
500(2)
Mini-Quiz 1
501(1)
Manipulating One-Dimensional Arrays
502(11)
Displaying the Contents of a One-Dimensional Array
502(1)
Using the Subscript to Access an Element in a One-Dimensional Array
503(1)
Searching a One-Dimensional Array
504(1)
Calculating the Average Amount Stored in a One-Dimensional Numeric Array
505(2)
Mini-Quiz 2
507(1)
Determining the Highest Value Stored in a One-Dimensional Array
507(2)
Updating the Values Stored in a One-Dimensional Array
509(1)
Sorting the Data Stored in a One-Dimensional Array
510(2)
Mini-Quiz 3
512(1)
Two-Dimensional Arrays
513(2)
Storing Data in a Two-Dimensional Array
515(3)
Calculating the Sum of the Numbers Stored in a Two-Dimensional Array
516(1)
Mini-Quiz 4
517(1)
Summary
518(1)
Answers to Mini-Quizzes
518(1)
Questions
519(5)
Exercises
524(2)
Application Lesson
526(1)
Using an Array in a C++ Program
526(1)
The Rainfall Program
526(3)
Completing the Rainfall Program
529(3)
Exercises
532(7)
More on Arrays
539(26)
Concept Lesson
540(1)
Arrays
540(1)
Creating an Array Using a Data Type That Is Not a Fundamental Data Type
540(3)
The Hansen Inc. Program
541(2)
Mini-Quiz 1
543(1)
Using Parallel One-Dimensional Arrays
543(3)
Mini-Quiz 2
546(1)
Summary
546(1)
Answers to Mini-Quizzes
547(1)
Questions
547(1)
Exercises
548(5)
Application Lesson
553(1)
Using an Array of Objects in a C++ Program
553(1)
Creating the Product Class
553(2)
Completing the Takoda Treasures Program
555(6)
Exercises
561(4)
Database Access
565(30)
Concept Lesson
566(1)
Accessing Data Stored in a Database
566(1)
Using a Connection Object
567(3)
Opening and Closing a Connection to a Data Source
568(2)
Mini-Quiz 1
570(1)
Using a Command Object to Retrieve Information From a Database
570(4)
Using SQL to Query a Database
570(3)
Mini-Quiz 2
573(1)
Using a Reader Object to Read the Database Records
574(2)
Mini-Quiz 3
576(1)
Summary
576(1)
Answers to Mini-Quizzes
577(1)
Questions
577(2)
Exercises
579(4)
Application Lesson
583(1)
Using a Database in a C++ Program
583(1)
The ABC Company Program
583(10)
Viewing the displayMenu( ) Function
584(1)
Completing the main( ) Function
585(3)
Completing the getByCode( ) Function
588(2)
Completing the getByStatus( ) Function
590(3)
Exercises
593(2)
Appendix A ASCII Codes
595(2)
Appendix B Built-in Mathematical Methods
597(14)
Using Built-in Mathematical Methods
598(6)
The Math: :Pow( ) and Math: :Sqrt( ) Methods
598(1)
The Math: :Cos( ), Math: :Sin( ), and Math: :Tan( ) Methods
599(2)
Mini-Quiz 1
601(1)
The Math: :Max( ), Math: :Min( ), Math: :Ceiling( ), and Math: :Floor( ) Methods
601(1)
The Math: :Sign( ) Method
602(1)
The Math: :Round( ) Method
602(2)
Mini-Quiz 2
604(1)
Summary
604(1)
Answers to Mini-Quizzes
605(1)
Questions
605(1)
Exercises
606(5)
Appendix C Pointers
611(2)
Using Pointer Variables
611(2)
Appendix D Displaying a Web Page
613(6)
Creating an Application That Displays a Web Page
613(6)
Index 619

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program