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.

9780201741254

Essential C++ for Engineers and Scientists

by
  • ISBN13:

    9780201741254

  • ISBN10:

    0201741253

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2001-10-08
  • Publisher: Pearson

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

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: $153.32 Save up to $65.93
  • Rent Book $87.39
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Essential C++ for Engineers and Scientists zeros in on the key elements of good programming and C++, using a multitude of interesting and appropriate engineering and scientific examples. This book covers the features of C++ needed for writing engineering programs, including many features of object-oriented programming. Early on, the book makes some simplifying assumptions that allow the use of C++ topics without lengthy explanation, and then later discusses the intricacies of the features. Readers will come away with the confidence needed to solve problems with C++.This book covers the essential features of C++, including control structures, one-dimensional and multidimensional arrays, and file manipulation. It contains over 80 engineering and scientific examples and programming projects drawn from interesting areas such as solar heating, environmentally sound power production, water conservation, automated manufacturing, and pipeline and power grid modeling. The new edition includes material on member operators and more coverage of member functions, as well as expanded coverage of files. Two new case studies demonstrate full algorithm development. All code has been updated to comply with ANSI C++ Standard. An appendix on C is also included for readers who want to use this language.This book is especially appropriate for engineers (but also for scientists, mathematicians, etc.) with no prior programming experience looking for an introduction to C++, focusing on the features of the language that can be applied to their industry.

Table of Contents

Preface xv
Computers: Revolutionary Machines with a Simple Design
1(26)
Computer Components
3(8)
Central Processing Unit
4(1)
Memory
4(2)
CPU---Memory Interaction
6(1)
Input/Output Devices
7(1)
Secondary Storage
8(1)
Connecting Computers
9(2)
Review Questions
11(1)
Computer Software
11(7)
Operating System
11(2)
Application Software
13(1)
Computer Languages
14(3)
C++
17(1)
Review Questions
18(1)
Object-Oriented Programming
18(5)
Software Engineering
18(1)
Requirements Specification
19(1)
Analysis
19(1)
Design
19(1)
Implementation
20(2)
Reuse Review
22(1)
Maintenance and Upgrades
22(1)
Computing for Engineers and Scientists
23(4)
Chapter Review
23(1)
Review Questions
24(3)
Basic Elements of a C++ Program
27(44)
Simple C++ Program
28(5)
Names and Keywords
32(1)
Review Questions
32(1)
Statement Execution
33(10)
Review Questions
42(1)
Input/Output Operations
43(2)
Review Questions
45(1)
Data Types
45(5)
Numeric Error
47(1)
Characters
47(1)
Logical Values
48(1)
Strings
49(1)
Review Questions
49(1)
Arithmetic Expressions
50(6)
Multiple Operators
50(1)
Operators / and %
51(1)
Mixed-Type Expressions
52(1)
Assignment Statements
52(1)
Automatic and Explicit Conversion of Data Types
53(1)
Avoiding Integer Division
53(2)
Rounding
55(1)
Review Questions
55(1)
Additional Operators
56(5)
Predefined Functions and Code Reuse
58(2)
Review Questions
60(1)
Namespaces
61(1)
Review Questions
61(1)
Software Designer Beware
62(9)
Syntax Errors
62(1)
Run-Time Errors
62(2)
Logic Errors
64(2)
Program Development to Simplify Debugging
66(1)
Chapter Review
66(1)
New C++ Constructs
67(1)
Programming Projects
68(3)
Control Structures
71(38)
Three Essential Structures
72(2)
Review Questions
73(1)
Conditions
74(7)
Logical Operators
76(1)
Variables of Type bool
77(2)
Complementing a Condition
79(1)
Review Questions
80(1)
Selection and Repetition
81(4)
Review Questions
84(1)
Nested and Multiple-Alternative Selection Structures
85(7)
Nested Structures
85(1)
Multiple-Alternative Structures
86(4)
Resist the Parallele-if Temptation
90(1)
Braces In if Statements
91(1)
Review Questions
92(1)
The switch Statement for Multiple Alternatives
92(3)
Review Questions
94(1)
Problem Solving with Decisions
95(7)
Case Study: Bindloe Island Finch Identification
95(7)
Review Questions
102(1)
Software Designer Beware
102(7)
Chapter Review
103(1)
New C++ Constructs
104(1)
Programming Projects
105(4)
Repetition Structures
109(48)
Loop Form and the while Statement
110(6)
Sentinel Loops
112(1)
Counting Loops
113(2)
Review Questions
115(1)
Interactive and Batch Processing
116(6)
Program-Controlled Input and Output Files
116(3)
Creating and Input File
119(1)
Loops That Exit on Input Failure
119(3)
Loop-Priming and Loop-Control-Update Input Statements
122(1)
Review Questions
122(1)
The for Statement
122(4)
Review Questions
125(1)
Operators That Change Their Operands
126(8)
Compound Assignment Operators
126(1)
Increment and Decrement Operators
127(2)
Displaying a Table
129(2)
Displaying Octal and Hexadecimal Values
131(1)
Aligning Floating Point Values
131(3)
Review Questions
134(1)
Input Errors
134(4)
Review Questions
138(1)
The do-while Loop
138(2)
Review Questions
140(1)
Problem Solving with Loops
140(6)
Case Study: A Calling Modem
141(5)
Review Questions
146(1)
Software Designer Beware
146(11)
Chapter Review
147(1)
New C++ Constructs
148(1)
Programming Projects
149(8)
User-Defined Functions
157(62)
Single-Result Functions
158(8)
Function Data Area
162(2)
Source File Structure
164(1)
Argument List Correspondence
164(1)
Logical Functions
164(1)
Review Questions
165(1)
void Functions
166(6)
Input Parameters in void Functions
166(4)
Subproblem: Functions smallDiv
170(1)
Review Questions
171(1)
Functions with Output Parameters
172(8)
Reference Parameters for Two-Way Communication
176(2)
Preferred Kinds of Functions
178(1)
Review Questions
179(1)
Overloaded Functions
180(5)
Problematic Calls to Overloaded Functions
183(1)
Function Return Type Not a Part of Signature
184(1)
Review Questions
184(1)
Introduction to Scope of Names
185(4)
Review Questions for Section 5.5
188(1)
Recursive Functions (Optional)
189(10)
Tracing a Recursive Function
191(2)
When and How to Trace Recursive Functions
193(2)
Roots of Equations
195(3)
Review Questions
198(1)
Problem Solving with User-Defined Functions
199(7)
Case Study: Collecting Area for Solar-Heated House
199(3)
Review Questions
202(4)
Software Designer Beware
206(13)
Chapter Review
207(1)
New C++ Constructs
208(2)
Programming Projects
210(9)
Data Structures and Objects
219(56)
Structure Types
220(2)
Accessing Structure Components
221(1)
Referencing Whole Structures
221(1)
Review Questions
222(1)
A Simple Class
222(5)
Data Members
224(1)
Constructors
224(1)
Accessors
225(1)
Member Functions
226(1)
Review Questions
226(1)
Analysis and Design of Classes
227(4)
Review Questions
230(1)
Implementation of a Design as a Class
231(11)
Constructors and Data Members
232(1)
Prototypes of Member Functions
232(1)
Access Specifiers
232(4)
Prototypes of Operators
236(1)
Member Functions Definitions
237(1)
Overloaded Operator Definitions
237(2)
Review Questions
239(3)
Accessors and Constructor Functions for Type Conversion
242(4)
Review Questions
246(1)
Overloading Operators as Members
246(6)
Referring to the Whole Default Object: *this
249(1)
Automatic Conversion of Operands
250(1)
Object Values or Object References
250(2)
Review Questions
252(1)
Class Reuse (Optional)
252(13)
Review Questions
265(1)
Software Designer Beware
265(10)
Chapter Review
266(1)
New C++ Constructs
267(1)
Programming Projects
268(7)
Arrays and Strings
275(56)
Arrays for List Storage
276(3)
Initialization
278(1)
Review Questions
278(1)
Sequential Access of Array Elements
279(10)
Partially Filled Arrays
282(3)
Passing Individual Arrays as Arguments
285(4)
Review Questions
289(1)
Using Whole Arrays as Parameters
289(8)
Arrays with Object Elements
295(1)
Review Questions
295(2)
Strings Revisited
297(6)
Cstrings and Class string
297(1)
Aligning String Output
298(1)
Left-Justification
298(1)
String Operators and Functions
299(4)
Review Exercises
303(1)
Classes with Array Components
303(10)
Case Study: EPA Reports on Pollutant Levels
303(8)
Review Questions
311(2)
Dynamically Allocated Array Components
313(8)
Returning Cells to the Heap
318(1)
Destructors
319(1)
Review Questions
320(1)
Software Designer Beware
321(10)
Chapter Review
321(1)
New C++ Constructs
322(2)
Programming Projects
324(7)
Multidimensional Arrays
331(46)
Creating and Using Multidimensional Arrays
332(9)
Review Questions
340(1)
Matrix Operations
341(7)
Matrix Multiplication
342(6)
Review Questions
348(1)
Linear Systems
348(11)
Augmented Matrix
349(1)
Case Study: Solving a System of Linear Equations
350(9)
Review Questions
359(1)
Dynamic Allocation of Two-Dimensional Array Components
359(6)
Review Question
365(1)
Software Designer Beware
365(12)
Chapter Review
366(1)
New C++ Constructs
366(2)
Programming Projects
368(9)
Input and Output Streams
377(28)
Text Files
378(7)
Mixing Whole-Line and Whitespace-Delimited Input
378(2)
The Keyboard and Screen
380(1)
Classes ifstream and ofstream
380(4)
Review Questions
384(1)
Stream Error Detection
385(3)
Error Recovery
386(1)
Review Questions
387(1)
Formatting Text Output
388(2)
Review Questions
389(1)
Searching a Database
390(10)
Case Study: Metals Database Inquiry
391(8)
Review Questions
399(1)
Software Designer Beware
400(5)
Chapter Review
400(1)
New C++ Constructs
401(1)
Programming Projects
401(4)
Introduction to Numerical Methods
405(36)
Finding Roots of Functions
406(7)
Newton's Method
406(6)
Secant Method
412(1)
Review Questions
412(1)
Fundamental Statistics
413(7)
Arithmetic Mean
413(1)
Standard Deviation
414(1)
Linear Regression
415(3)
Correlation
418(1)
Review Questions
419(1)
Numerical Differentiation
420(5)
Review Questions
425(1)
Numerical Integration
425(4)
Simpson's Rule
428(1)
Review Questions
428(1)
Solving First-Order Differential Equations
429(4)
Euler Method
430(2)
Runge-Kutta Method
432(1)
Review Questions
433(1)
Software Designer Beware
433(8)
Chapter Review
433(1)
References on Numerical Methods
434(1)
Programming Projects
434(7)
Answers 441(38)
Appendix A C, Parent Language of C++ 479(8)
Appendix B Selected C++ Standard Functions/Macros 487(6)
Appendix C Selected C++ Input/Output Facilities 493(2)
Appendix D Selected Facilities Provided by Class string 495(4)
Appendix E C++ Operators 499(2)
Appendix F C++ Keywords 501(2)
Appendix G Microsoft Visual C++ Integrated Development Environment, An Introduction 503(6)
Appendix H Borland C++ Builder Integrated Development Environment, An Introduction 509(6)
Appendix I Character Sets 515(4)
Index 519

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.

Excerpts

Essential C++ for Engineers and Scientists,Second edition, teaches the essentials of problem solving and programming using a subset of C++ as the implementation language. It includes many practical examples from a wide range of scientific and engineering disciplines. The text can be used for a first course in programming: It assumes no prior knowledge of computers or programming.Although somewhat abbreviated, the C++ coverage in this book includes the features useful in typical engineering and scientific programs, and it demonstrates these features as they are actually used, not in isolation. Language topics are presented in an order common in teaching other languages: first the basic control structures (sequence, selection, and repetition), input/output operations, expression evaluation, and library functions, and then defining and calling the user's own functions. Next, the fundamental construct of an object-oriented C++ program, the class, is presented. After the chapter on classes, the text builds on the notion of object orientation while continuing the standard subject matter of an introductory programming course for engineers and scientists: arrays and strings, multidimensional arrays, a review of file manipulation, and an introduction to selected numerical methods.When C++ offers multiple ways of accomplishing the same goal, the text usually selects just one and uses it consistently. For example, it teaches the use of references for output parameters and limits coverage of pointers to array parameters and to dynamically allocated arrays. Changes in the New EditionThroughout the text, all programming examples have been updated to conform to standard C++ use of namespaces. We have improved the book in many other ways as well: Integrated introduction to input/output file use with loop coverage Added presentation of structs Added smaller scale first example of classes Added member operators while retaining friend operators Expanded coverage of dynamically allocated arrays, both one- and two-dimensional Integrated standard string class into data type coverage beginning in Chapter 2 (retained Cstring basics in array chapter) Expanded numerical methods coverage by adding a case study on the use of augmented matrices to solve systems of linear equations Added case studies using decision structures for finch classification and file use for database representation Included more examples of reference parameters Expanded input error recovery coverage Added 50% more programming projects Created new appendices in response to reviewer requests: Introduction to C programming language Laboratory-style introductions to two C++ integrated development environments--Microsoft Visual C++ and Borland C++ Builder Flexible Ordering of TopicsProfessors who prefer to present topics in an order different from the one in the textbook should check the dependencies shown in Table P.1 (in preface). Several sections of the text are completely optional, with no subsequent dependencies: Recursive Functions (5.6), Class Reuse (6.7), and Heap-Dynamic Array Allocation (7.6, 8.4). Figure P.1 (in preface) lists several different possible orderings of topics. What About NO Objects?A careful study of Fig. P.1 (in preface) shows that if you prefer not to cover objects at all, you can still present all other language topics except multidimensional arrays and dynamic array allocation. We have chosen to show function parameters that are multidimensional arrays only in the context of an object representation. This choice stems from our conviction that such a representation is simpler, since students can pass matrices as input and output parameters in exactly the same way as they pass simpler objects. Software Engineering ConceptsThis text presents

Rewards Program