Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Engineering Problem Solving with C++ - Delores M. Etter, Jeanine A. Ingber

Engineering Problem Solving with C++

United States Edition
Buch | Softcover
576 Seiten
2008 | 2nd edition
Pearson (Verlag)
978-0-13-601175-0 (ISBN)
CHF 113,70 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
For one/two semester courses in Engineering and Computer Science at the freshman/sophomore level.

 

This text is a clear, concise introduction to problem solving and the C++ programming language. The authors’ proven five-step problem solving methodology is presented and then incorporated in every chapter of the text. Outstanding engineering and scientific applications are used throughout; all applications are centered around the theme of engineering challenges in the 21st century.

 

Supplements Include:

 

For Students: Access Data Files at  www.prenhall.com/etter

 

Instructor Resource Center includes:



 Lecture PowerPoints 
 Solutions to all exercises in the text.
Quizzes to accompany all chapters

Dr. Delores M. Etter, Assistant Secretary of the Navy for Research, Development and Acquisition, leads R&D and acquisition throughout the U.S. Navy. She is the first United States Naval Academy faculty member to hold the Office of Naval Research Distinguished Chair in Science and Technology. Dr. Etter is a member of the National Academy of Engineering, and a fellow of IEEE, AAAS, and ASEE. Jeanine Ingber was educated at the University of Michigan where she completed a Master’s Degree in Computer Aided Design Engineering. She held faculty positions at Iowa State University and the University of New Mexico, and has been honored in three separate editions of Who’s Who Among American Teachers. Jeanine is currently the owner of IngberConsulting.com and works as a computer consultant and technical trainer offering short courses in C, C++, Java, and Object Oriented Design using UML.

  Contents

 

Chapter 1

INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING 2

1.1 Historical Perspective 3

1.2 Recent Engineering Achievements 7

           Changing Engineering Environment 9

1.3 Computing Systems 11

           Computer Hardware 11

           Computer Software 12

1.4 Data Representation and Storage 16

           Number Systems 17

           Data Types and Storage 23

1.5 An Engineering Problem-Solving Methodology 26

Summary 29

 

Chapter 2

SIMPLE C++ PROGRAMS 34

ENGINEERING CHALLENGE: Global Change 34

2.1 Program Structure 35

2.2 Constants and Variables 39

           Scientific Notation 41

           Numeric Data Types 42

           Boolean Data Type 44

           Character Data Type 44

           String Data 46

           Symbolic Constants 47

2.3 C++ Operators 47

           Assignment Operator 47

           Arithmetic Operators 49

           Precedence of Operators 51

           Overflow and Underflow 54

           Increment and Decement Operators 55

           Abbreviated Assignment Operators 55

2.4 Standard Input and Output 57

           The cout Object 57

           Stream Objects 58

           Manipulators 60

           The cin Object 63

2.5 Numerical Technique: Linear Interpolation 65

2.6 Problem Solving Applied: Freezing Temperature of Seawater 69

2.7 Basic Functions Included in the C++ Standard Library 73

           Elementary Math Functions 74

           Trigonometric Functions 75

           Hyperbolic Functions* 76

           Character Functions 78

2.8 Problem Solving Applied: Velocity Computation 78

2.9 System Limitations 82

Summary 83

 

Chapter 3

CONTROL STRUCTURES 92

ENGINEERING CHALLENGE: Global Change 92

3.1 Algorithm Development 93

           Top-Down Design 93

           Structured Programming 94

           Refinement in Pseudocode 95

           Evaluation of Alternative Solutions 98

3.2 Conditional Expressions 98

           Relational Operators 98

           Logical Operators 99

           Precedence and Associativity 101

3.3 Selection Statements 102

           Simple if Statements 102

           if/else Statement 104

           switch Statement 108

3.4 Loop Structures 111

           while Loop 111

           do/while Loop 114

           for Loop 116

           break and continue Statements 120

           Structuring Input Loops 121

3.5 Problem Solving Applied: Weather Balloons 125

Summary 130

 

Chapter 4

WORKING WITH DATA FILES 138

ENGINEERING CHALLENGE: Weather Prediction 138

4.1 Stream Class Hierarchy 139

Stream Class Hierarchy 139

           ifstream Class 142

           ofstream Class 144

4.2 Reading Data Files 145

           Specified Number of Records 146

           Trailer or Sentinel Signal 148

           End-of-File 150

4.3 Generating a Data File 153

4.4 Problem Solving Applied: Data Filters–Modifying an HTML File 156

4.5 Error Checking 159

           The Stream State 161

4.6 Numerical Technique: Linear Modeling* 166

4.7 Problem Solving Applied: Ozone Measurements* 169

Summary 175

 

Chapter 5

MODULAR PROGRAMMING WITH FUNCTIONS 182

ENGINEERING CHALLENGE: Enhanced Oil and Gas Recovery 182

5.1 Modularity 183

5.2 Programmer-Defined Functions 185

Function Definition 186

           Function Prototype 194

5.3 Parameter Passing 195

           Pass by Value 196

           Pass by Reference 198

           Storage Class and Scope 204

5.4 Problem Solving Applied: Calculating a Center of Gravity 206

5.5 Random Numbers 210

           Integer Sequences 210

           Floating-Point Sequences 214

5.6 Problem Solving Applied: Instrumentation Reliability 215

5.7 Numerical Technique: Roots of Polynomials* 222

           Polynomial Roots 222

           Incremental-Search Technique 224

5.8 Problem Solving Applied: System Stability* 226

           Newton—Raphson Method* 232

5.9 Numerical Technique: Integration* 236

Integration Using the Trapezoidal Rule 236

Summary 240

 

Chapter 6

ONE-DIMENSIONAL ARRAYS 250

ENGINEERING CHALLENGE: Hurricane Tracking 250

6.1 Arrays 251

           Definition and Initialization 252

Computation and Output 256

           Function Arguments 260

6.2 Problem Solving Applied: Hurricane Categories 263

6.3 Statistical Measurements 269

           Simple Analysis 269

           Variance and Standard Deviation 271

           Custom Header Files 274

6.4 Problem Solving Applied: Speech Signal Analysis 274

6.5 Sorting Algorithms 280

           Selection Sort 281

6.6 Search Algorithms 282

           Unordered Lists 283

           Ordered Lists 283

6.7 Character Strings 285

           C Style String Definition and I/O 285

String Functions 288

6.8 Problem Solving Applied: Palindromes 289

6.9 The string Class 293

Summary 295

 

Chapter 7

TWO-DIMENSIONAL ARRAYS AND MATRICES 300

ENGINEERING CHALLENGE: Terrain Navigation 300

7.1 Two-Dimensional Arrays 301

           Declaration and Initialization 302

           Computations and Output 306

           Function Arguments 308

7.2 Problem Solving Applied: Terrain Navigation 311

7.3 Matrices* 316

           Determinant 316

Transpose 317

           Matrix Addition and Subtraction 318

Matrix Multiplication 318

7.4 Numerical Technique: Solution to Simultaneous Equations* 321

           Graphical Interpretation 321

           Gauss Ellimination 323

7.5 Problem Solving Applied: Electrical Circuit Analysis* 327

7.6 Higher Dimensional Arrays* 333

Summary 335

 

Chapter 8

AN INTRODUCTION TO CLASSES 342

ENGINEERING CHALLENGE: Simulation 342

8.1     Programmer Defined Types 343

8.2     Design and Implementation of Classes 345

                        Class Declaration 345

Class Implementation 347

8.3     Class Composition 353

8.4     Constructors 357

Initialization Lists 361   

8.5     The vector Class 364

                        Parameter Passing 366

8.6   Problem Solving Applied: Calculating Probabilities 368

8.7   The UnitVector Class 381

        Private Member Functions 382

        Class Objects as Arguments to Member Functions 384

8.8   Problem Solving Applied: Simulation 385

Summary 392

 

Chapter 9

AN INTRODUCTION TO POINTERS 396

ENGINEERING CHALLENGE: Weather Patterns 396

9.1 Addresses and Pointers 397

        Address Operator 398

        Pointer Assignment 400

        Pointer Arithmetic 403

9.2 Pointers to Array Elements 406

        One-Dimensional Arrays 407

        Character Strings 409

        Pointers as Function Arguments 410

9.3 Problem Solving Applied: El Ni˜no[K1] -Southern Oscillation Data 415

9.4 Dynamic Memory Allocation 418

        The new Operator 418

        Dynamically Allocated Arrays 420

        The delete Operator 420

9.5 Problem Solving Applied: Seismic Event Detection 422

9.6 Common Errors Using new and delete 428

9.7 Data Structures and the C++ Standard Template Library (STL) 430

        The link Class 430

        The stack Class 434

        The queue Class 436

9.8 Problem Solving Applied: Concordance of a Text File* 438

Summary 444

 

Chapter 10

ADDITIONAL TOPICS IN PROGRAMMING WITH CLASSES 450

ENGINEERING CHALLENGE: Artificial Intelligence 450

10.1 Introduction to Generic Programming 451

        Function Templates 452

        Overloading Operators 456

        The pixel Class 456

        Arithmetic Operators 458

        friend Functions 463

10.2 Problem Solving Applied: Color Image Processing 468

10.3 Recursion 475

        Factorial Function 475

        Fibonacci Sequence 477

        Binary Trees 479

10.4 Class Templates 490

10.5 Inheritance 496

        The Square Class 497

        The Cube Class 502

   Virtual Methods 504

10.6 Problem Solving Applied: Iterated Prisoner’s Dilemma 507

Summary 516

 

Appendix A   C++ Standard Library 521

Appendix B   ASCII Character Codes 529

Appendix C   Using MATLAB to Plot Data from ASCII Files 533

        C++ Program to Generate a Data File 533

        ASCII Data File Generated by the C++ Program 534

        Generating a Plot with MATLAB 534

Appendix D   References 536

Appendix E   PRACTICE! Solutions 537

Index 553

 [K1]Comp: fix accent to be over “n”

Erscheint lt. Verlag 3.1.2008
Sprache englisch
Maße 229 x 191 mm
Gewicht 968 g
Themenwelt Informatik Office Programme Outlook
Informatik Software Entwicklung Objektorientierung
Technik
ISBN-10 0-13-601175-6 / 0136011756
ISBN-13 978-0-13-601175-0 / 9780136011750
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich