1. Trang chủ
  2. » Công Nghệ Thông Tin

Diane zak introduction to programming with c++

756 2.3K 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Front Cover

  • Title Page

  • Copyright

  • Brief Contents

  • Contents

  • Preface

  • CHAPTER 1 An Introduction to Programming

    • Programming a Computer

      • The Programmer’s Job

      • Do I Have What It Takes to Be a Programmer?

      • Employment Opportunities

    • A Brief History of Programming Languages

      • Machine Languages

      • Assembly Languages

      • High-Level Languages

    • Control Structures

      • The Sequence Structure

      • The Selection Structure

      • The Repetition Structure

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 2 Beginning the Problem-Solving Process

    • Problem Solving

    • Solving Everyday Problems

    • Creating Computer Solutions to Problems

    • Step 1—Analyze the Problem

    • Step 2—Plan the Algorithm

    • Step 3—Desk-Check the Algorithm

    • The Gas Mileage Problem

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 3 Variables and Constants

    • Beginning Step 4 in the Problem-Solving Process

      • Internal Memory

    • Selecting a Name for a Memory Location

      • Revisiting the Treyson Mobley Problem

    • Selecting a Data Type for a Memory Location

      • How Data Is Stored in Internal Memory

    • Selecting an Initial Value for a Memory Location

    • Declaring a Memory Location

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 4 Completing the Problem-Solving Process

    • Finishing Step 4 in the Problem-Solving Process

    • Getting Data from the Keyboard

    • Displaying Messages on the Computer Screen

    • Arithmetic Operators in C++

      • Type Conversions in Arithmetic Expressions

      • The static_cast Operator

    • Assignment Statements

    • Step 5—Desk-Check the Program

    • Step 6—Evaluate and Modify the Program

    • Arithmetic Assignment Operators

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 5 The Selection Structure

    • Making Decisions

    • Flowcharting a Selection Structure

    • Coding a Selection Structure in C++.

    • Comparison Operators

      • Swapping Numeric Values

      • Displaying the Sum or Difference

    • Logical Operators

      • Using the Truth Tables

      • Calculating Gross Pay

      • Pass/ Fail Program

    • Converting a Character to Uppercase or Lowercase.

    • Formatting Numeric Output

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 6 More on the Selection Structure

    • Making Decisions

    • Flowcharting a Nested Selection Structure

    • Coding a Nested Selection Structure

    • Logic Errors in Selection Structures

      • First Logic Error: Using a Compound Condition Rather Than a Nested Selection Structure

      • Second Logic Error: Reversing the Outer and Nested Decisions

      • Third Logic Error: Using an Unnecessary Nested Selection Structure

    • Multiple-Alternative Selection Structures

      • The switch Statement

    • Summary

    • Key Terms.

    • Review Questions

    • Exercises

  • CHAPTER 7 The Repetition Structure

    • Repeating Program Instructions

    • Using a Pretest Loop to Solve a Real-World Problem

    • Flowcharting a Pretest Loop

    • The while Statement

    • Using Counters and Accumulators

      • The Sales Express Program

    • Counter-Controlled Pretest Loops

    • The for Statement

      • The Holmes Supply Program

      • The Colfax Sales Program

      • Another Version of the Miller Incorporated Program

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 8 More on the Repetition Structure

    • Posttest Loops

    • Flowcharting a Posttest Loop

    • The do while Statement

    • Nested Repetition Structures

    • The Asterisks Program

    • The Savings Calculator Program

      • The pow Function

      • Coding the Savings Calculator Program

    • Modifying the Savings Calculator Program

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 9 Value-Returning Functions

    • Functions

    • The Hypotenuse Program

      • Finding the Square Root of a Number

    • The Random Addition Problems Program

      • Generating Random Integers

    • Creating Program-Defined Value-Returning Functions

    • Calling a Function

    • Function Prototypes

    • The Plano Elementary School Program

    • The Area Calculator Program

    • The Scope and Lifetime of a Variable

      • The Bonus Calculator Program

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 10 Void Functions

    • Void Functions

    • Passing Variables to a Function

      • Reviewing Passing Variables by Value

      • Passing Variables by Reference

    • The Salary Program

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 11 One-Dimensional Arrays

    • Arrays

    • One-Dimensional Arrays

      • Declaring and Initializing a One-Dimensional Array

      • Entering Data into a One-Dimensional Array

      • Displaying the Contents of a One-Dimensional Array

      • Coding the XYZ Company’s Sales Program

    • Passing a One-Dimensional Array to a Function

    • The Moonbucks Coffee Program—Calculating a Total and Average

    • The KL Motors Program—Searching an Array

    • The Hourly Rate Program—Accessing an Individual Element

    • The Random Numbers Program

    • Sorting the Data Stored in a One-Dimensional Array

    • Parallel One-Dimensional Arrays

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 12 Two-Dimensional Arrays

    • Using Two-Dimensional Arrays

      • Declaring and Initializing a Two-Dimensional Array

      • Entering Data into a Two-Dimensional Array

      • Displaying the Contents of a Two-Dimensional Array

      • Coding the Caldwell Company’s Orders Program

    • Accumulating the Values Stored in a Two-Dimensional Array

    • Searching a Two-Dimensional Array

    • Passing a Two-Dimensional Array to a Function

    • Summary

    • Key Term

    • Review Questions

    • Exercises

  • CHAPTER 13 Strings

    • The string Data Type

    • The Creative Sales Program

      • The getline Function

      • The ignore Function

    • The ZIP Code Program

      • Determining the Number of Characters Contained in a string Variable

      • Accessing the Characters Contained in a string Variable

    • The Rearranged Name Program

      • Searching the Contents of a string Variable

    • The Annual Income Program

      • Removing Characters from a string Variable

      • Replacing Characters in a string Variable

    • The Social Security Number Program

      • Inserting Characters Within a string Variable

    • The Company Name Program

      • Duplicating a Character Within a string Variable

      • Concatenating Strings

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • CHAPTER 14 Sequential Access Files

    • File Types

    • The CD Collection Program

    • Creating File Objects

    • Opening a Sequential Access File

      • Determining Whether a File Was Opened Successfully

    • Writing Data to a Sequential Access File

    • Reading Information from a Sequential Access File

    • Testing for the End of a Sequential Access File

    • Closing a Sequential Access File

    • Coding the CD Collection Program.

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • APPENDIX A: Answers to Mini-Quizzes and Labs

  • APPENDIX B: C++ Keywords

  • APPENDIX C: ASCII Codes

  • APPENDIX D: How to Use Microsoft Visual C++

  • APPENDIX E: How to Use Dev-C++

  • APPENDIX F: Classes and Objects

    • Object-Oriented Terminology

    • Defining a Class in C++

    • Instantiating an Object and Referring to a Public Member

    • Example 1—A Class that Contains Public Data Members Only

      • Header Files

    • Example 2—A Class that Contains a Private Data Member and Public Member Methods

    • Example 3—Using a Class that Contains Two Constructors

    • Example 4—A Class that Contains Overloaded Methods

    • Summary

    • Key Terms

    • Review Questions

    • Exercises

  • Index

Nội dung

Đây là quyển sách tiếng anh về lĩnh vực công nghệ thông tin cho sinh viên và những ai có đam mê. Quyển sách này trình về lý thuyết ,phương pháp lập trình cho ngôn ngữ C và C++.

[...]... An Introduction to Programming with C++, Sixth Edition uses the C++ programming language to teach programming concepts This book is designed for a beginning programming course Although the book provides instructions for using the Microsoft® Visual C++ and Dev -C++ compilers, it can be used with most C++ compilers, often with little or no modification Organization and Coverage An Introduction to Programming. .. Microsoft Visual C++ 2010 It also was tested using Dev -C++ However, the book can be used with most C++ compilers, often with little or no modification Course Technology Data Files You are granted a license to copy the data files to any computer or computer network used by individuals who have purchased this book CHAPTER An Introduction to Programming After studying Chapter 1, you should be able to: Define the... to Programming A Brief History of Programming Languages 4 Just as human beings communicate with each other through the use of languages such as English, Spanish, Hindi, and Chinese, programmers use a variety of programming languages to communicate with the computer In the next sections, you will follow the progression of programming languages from machine languages to assembly languages, and then to. .. students with no previous programming experience learn how to plan and create well-structured programs By the end of the book, students will have learned how to write programs using the sequence, selection, and repetition structures, as well as how to create and manipulate functions, sequential access files, arrays, strings, classes, and objects Approach An Introduction to Programming with C++, Sixth... Your Own Computer To use your own computer to complete the Labs and Computer Exercises in this book, you will need a C++ compiler The book was written and Quality Assurance tested using Microsoft Visual C++ 2010 It also was tested using Dev -C++ However, the book can be used with most C++ compilers, often with little or no modification If your book came with a copy of Microsoft Visual C++, then you may... from customers) and an accounts payable program (which issues checks to creditors) The ability to use an object for more than one purpose enables code-reuse, which saves programming time and money—an advantage that contributes to the popularity of object-oriented programming Examples of high-level languages that can be used to create both procedure-oriented and objectoriented programs include C++, Visual... demonstrating why they need to learn the concepts and skills presented Each chapter begins with an introduction to one or more programming concepts The concepts are illustrated with code examples and sample programs The sample programs allow the student to observe how the current concept can be used before they are introduced to the next concept The concepts are taught using standard C++ commands Following... Introduction to Programming with C++, Sixth Edition contains 14 chapters and several appendices In order to provide the most up -to- date instructions for using the Microsoft Visual C++ and Dev -C++ compilers, Appendices D and E are available online You can obtain the appendices by connecting to the Course Technology Web site (www.cengage.com/coursetechnology) and then navigating to the page for this book... Chapter 1) are five labs: Stop and Analyze, Plan and Create, Modify, Desk-Check, and Debug Each lab teaches students how to apply the chapter concepts; however, each does so in a different way Features An Introduction to Programming with C++, Sixth Edition is an exceptional textbook because it also includes the following features: READ THIS BEFORE YOU BEGIN This section is consistent with Course Technology’s... expected to work in teams and interact directly with users, employers want programmers who are able to communicate with nontechnical personnel Business skills are also important, especially for those wishing to advance to managerial positions.” If this description sounds like you, then you probably have what it takes to be a programmer But if it doesn’t sound like you, it’s still worth your time to understand . h1" alt="" AN INTRODUCTION TO PROGRAMMING WITH C++ This page intentionally left blank AN INTRODUCTION TO PROGRAMMING WITH C++ DIANE ZAK SIXTH EDITION Australia. Control Number: 2009941969 ISBN-13: 97 8-0 -5 3 8-4 665 2-3 ISBN-10: 0-5 3 8-4 665 2-9 Course Technology 20 Channel Center Street Boston, MA 02210 USA Some of the

Ngày đăng: 19/03/2014, 14:07

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w