Provides an introduction to engineering problem solving using the ANSI C programming language that features the widest variety of real world applications available. Softcover.
Table of Contents
1. An Introduction to Engineering Problem Solving. 2. Simple C++ Programs. 3. Control Structures. 4. Working with Data Files. 5. Modular Programming with Functions. 6. One Dimensional Arrays. 7. Two Dimensional Arrays and Matrices. 8. An Introduction to Classes. 9. An Introduction to Pointers. 10. Additional Topics in Programming with Classes. Appendix A: Components in the Standard C++ Library. Appendix B: ASCII Character Codes. Appendix C: List of References.
Object-based programming is used in many fields of engineering and science and is likely to be seen in the workplace. C++ is an object-based programming language derived from the C programming language, which makes it a good choice for an introduction to computing course for engineers and scientists. Using C++, object-based design and programming can be introduced early while focusing on the basic control structures, data structures, and functions necessary for scientific programming. The features of the C programming language that make it attractive for system-level operations are supported by C++, making the latter one of the most powerful and versatile programming languages available. This text was written to introduce engineering problem solving with an object-based programming approach. Our objectives are the following: to develop a consistentmethodology for solving engineering problems, to present theobject-based features of C++while focusing on thefundamentals of programming, to illustrate the problem-solving process with C++ through a variety ofengineering examples and applications, to provide an easy-to-understand,integrated introduction to function templates and classes defined in the Standard C++ Library. To accomplish these objectives, Chapter 1 presents afive-step processthat is used consistently in the rest of the text for solving engineering problems. Chapter 2 introduces the use ofpredefined objects and member functionsin the discussion ofdata typesandstandard input and output.Chapters 3-5 present the fundamental capabilities of C++ for solving engineering problems,including control structures, data files, and functions.Chapters 6 and 7 presentarraysand introduce the reader tofunction templatesand thevector class.Chapter 8 is an introduction toprogrammer-defined classes.Chapter 9 introduces the use ofpointers, dynamic memory allocation,andclasses defined in the Standard C++ library to implement dynamic data structures.Chapter 10 provides a more in-depth look at classes, includingoverloading operators, inheritance, and virtual functions.Throughout all these chapters, we present a large number of examples from many different engineering, science, and computer science disciplines. The solutions to these examples are developed using the five-step process and Standard C++. Prerequisites No prior experience with the computer is assumed. The mathematical prerequisites arecollege algebra and trigonometry.Of course, the initial material can be covered much faster if the student has used other computer languages or software tools. Course Structure The material in these chapters was selected to provide the basis for a one-term course in engineering and scientific computing. These chapters contain the essential topics of mathematical computations, character data, control structures, functions, arrays, classes, and pointers. Students with background in another computer language should be able to complete this material in one semester. A minimal course that provides only an introduction to C++ can be designed using the nonoptional sections of the text. (Optional sections are indicated in the Contents with an *.) Three ways to use the text, along with the recommended chapter sections, are Introduction to C++.Many freshman introductory courses introduce the student to several computer tools in addition to an introduction to a language. For these courses, we recommend covering the nonoptional sections of Chapters 1-7. This material introduces students to the fundamental capabilities of C++, and they will be able to write substantial programs using mathematical computations, character data, control structures, functions, and arrays. Problem Solving with C++.In a semester course devoted specifical