9780195117677

An Introduction to C++ and Numerical Methods

by ;
  • ISBN13:

    9780195117677

  • ISBN10:

    0195117670

  • Format: Paperback
  • Copyright: 1998-08-06
  • Publisher: Oxford University Press

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • 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.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $110.88 Save up to $11.09
  • Rent Book $99.79
    Add to Cart Free Shipping

    TERM
    PRICE
    DUE

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 Rental copy of this book is 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.

Summary

An Introduction to C++ and Numerical Methods provides a brief yet comprehensive introduction to programming and numerical methods for students in engineering, chemistry, physics, and applied mathematics. It is suitable for second semester or second year students who have had at least asemester of calculus. This text offers students both an introduction to programming in C++ and clear explanations of the basics of numerical methods, including numerical integration and the solution of ordinary differential equations, nonlinear equations, and systems of linear equations. It is unique among textbooksat this level in its extensive coverage of numerical methods used in scientific and engineering computation. An Introduction to C++ and Numerical Methods is designed to help students move quickly into writing interesting and sophisticated programs. The text begins with an introduction to scientific computing and the basic constructs of C++, including variables and assignment, typing, if statements, forand while loops, functions, one-dimensional arrays, and the cout and cin objects. After students have gained some experience with programming using these constructs, the topics are later revisited in greater detail, leading up to the important topic of classes and object-oriented programming.Throughout the text Ortega and Grimshaw emphasize the basic paradigms for constructing good programs and detecting errors.

Table of Contents

PREFACE ix
PART I Basic Constructs 1(114)
1 INTRODUCTION
3(13)
1.1 Computers and Software
4(2)
1.2 Binary Numbers and Memory
6(3)
1.3 Rounding Errors
9(2)
1.4 Programs
11(5)
2 A FIRST C++ PROGRAM
16(14)
2.1 Computation and Assignment
16(2)
2.2 Variable Types
18(2)
2.3 Input and Output
20(2)
2.4 A Complete Program
22(2)
2.5 Errors and Debugging
24(6)
3 DECISIONS, DECISIONS
30(14)
3.1 The if Statement
30(4)
3.2 Logical Operators
34(1)
3.3 Nested If and Switch Statements
35(4)
3.4 Good Programming Practice
39(5)
4 AROUND AND AROUND: ITERATION
44(12)
4.1 The for Statement
44(2)
4.2 The while Statement
46(3)
4.3 An Approximation to e(x)
49(1)
4.4 Advanced Loop Control
50(6)
5 FUNCTIONS
56(11)
5.1 Library Functions
57(1)
5.2 User-Defined Functions
58(3)
5.3 More General Functions
61(2)
5.4 Local versus Global Variables
63(4)
6 NUMERICAL INTEGRATION
67(11)
6.1 Approximate Integration Formulas
67(2)
6.2 Flow Charts
69(1)
6.3 An Integration Program
70(3)
6.4 Discretization Error
73(5)
7 READING AND WRITING: INPUT/OUTPUT
78(10)
7.1 Precision
78(2)
7.2 Spacing
80(2)
7.3 File Input/Output
82(2)
7.4 The printf() Function
84(4)
8 SOLUTION OF NONLINEAR EQUATIONS
88(9)
8.1 The Bisection Method
89(3)
8.2 Newton's Method
92(2)
8.3 Errors and a Combined Method
94(3)
9 LOTS OF VALUES: ARRAYS
97(9)
9.1 Array Declarations
97(3)
9.2 Arrays and Functions
100(6)
10 DIFFERENTIAL EQUATIONS
106(9)
10.1 The Initial Value Problem
106(1)
10.2 Euler's Method
107(3)
10.3 Systems of Equations
110(5)
PART II Extensions of the Basic Constructs 115(92)
11 MORE ON DATA TYPES AND OPERATIONS
117(19)
11.1 Other Fundamental Data Types
117(3)
11.2 Operations
120(4)
11.3 Characters and Strings
124(5)
11.4 User-Defined Data Types
129(7)
12 LOTS MORE VALUES: TWO-DIMENSIONAL ARRAYS
136(10)
12.1 Two-Dimensional Arrays
136(3)
12.2 Arrays and Functions
139(3)
12.3 Arrays of Strings
142(4)
13 LINEAR EQUATIONS
146(14)
13.1 Least-Squares Approximation
146(2)
13.2 Gaussian Elimination
148(4)
13.3 Errors
152(5)
13.4 Efficiency
157(3)
14 MORE ON FUNCTIONS
160(16)
14.1 Reference versus Value
160(3)
14.2 Recursive and Inline Functions
163(3)
14.3 Function Miscellanea
166(4)
14.4 Libraries of Functions
170(6)
15 POINTERS
176(14)
15.1 Pointer Variables
176(3)
15.2 Pointers and Arrays
179(2)
15.3 Pointers and Functions
181(5)
15.4 Pointers and Strings
186(4)
16 DYNAMIC MEMORY
190(17)
16.1 Dynamic Memory Allocation
191(5)
16.2 Matrices and Strings
196(3)
16.3 Linked Lists
199(8)
PART III Object-Oriented Programming 207(54)
17 CLASSES AND OBJECTS
209(22)
17.1 A Simple Class
209(8)
17.2 Classes and Functions
217(7)
17.3 Stream Classes
224(7)
18 ARRAY CLASSES AND DYNAMIC MEMORY
231(15)
18.1 A Vector Class
231(1)
18.2 Dynamic Memory Allocation
232(8)
18.3 A Matrix Class
240(6)
19 INHERITANCE
246(15)
19.1 Derived Classes
246(4)
19.2 Polymorphism and Virtual Functions
250(3)
19.3 Linear Equations
253(8)
FURTHER READING 261(2)
APPENDIX 1 ASCII CHARACTER CODES 263(2)
APPENDIX 2 LIBRARY FUNCTIONS 265(2)
INDEX 267

Rewards Program

Write a Review