简介
Summary:
Publisher Summary 1
Starting Out with Programming Logic and Design, Second Edition, is a language-independent introductory programming book that orients students to programming concepts and logic without assuming any previous programming experience. In the successful, accessible style of Tony Gaddis' best-selling texts, useful examples and detail-oriented explanations allow students to become comfortable with fundamental concepts and logical thought processes used in programming without the complication of language syntax. Students gain confidence in their program design skills to transition into more comprehensive programming courses.
The book is ideal for a programming logic course taught as a precursor to a language-specific introductory programming course, or for the first part of an introductory programming course.
目录
Table Of Contents:
Preface xiii
Introduction to Computers and Programming 1(28)
Introduction 1(1)
Hardware 2(5)
How Computers Store Data 7(5)
How a Program Works 12(8)
Types of Software 20(9)
Review Questions 23(6)
Input, Processing, and Output 29(46)
Designing a Program 29(5)
Output, Input, and Variables 34(9)
Variable Assignment and Calculations 43(13)
In the Spotlight: Calculating a Percentage 47(3)
In the Spotlight: Calculating an Average 50(3)
In the Spotlight: Converting a Math Formula to a Programming Statement 53(3)
Variable Declarations and Data Types 56(6)
Named Constants 62(1)
Hand Tracing a Program 63(1)
Documenting a Program 64(11)
In the Spotlight: Using Named Constants, Style Conventions, and Comments 66(2)
Review Questions 68(4)
Programming Exercises 72(3)
Modules 75(40)
Introduction to Modules 75(3)
Defining and Calling a Module 78(10)
In the Spotlight: Defining and Calling Modules 84(4)
Local Variables 88(2)
Passing Arguments to Modules 90(14)
In the Spotlight: Passing an Argument to a Module 95(5)
In the Spotlight: Passing an Argument by Reference 100(4)
Global Variables and Global Constants 104(11)
In the Spotlight: Using Global Constants 105(4)
Review Questions 109(4)
Programming Exercises 113(2)
Decision Structures and Boolean Logic 115(48)
Introduction to Decision Structures 115(10)
In the Spotlight: Using the If-Then Statement 122(3)
Dual Alternative Decision Structures 125(6)
In the Spotlight: Using the If-Then-Else Statement 126(5)
Comparing Strings 131(4)
Nested Decision Structures 135(7)
In the Spotlight: Multiple Nested Decision Structures 138(4)
The Case Structure 142(5)
In the Spotlight: Using a Case Structure 145(2)
Logical Operators 147(7)
Boolean Variables 154(9)
Review Questions 155(4)
Programming Exercises 159(4)
Repetition Structures 163(54)
Introduction to Repetition Structures 163(1)
Condition-Controlled Loops: While, Do-While, and Do-Until 164(19)
In the Spotlight: Designing a While Loop 169(9)
In the Spotlight: Designing a Do-While Loop 178(5)
Count-Controlled Loops and the For Statement 183(18)
In the Spotlight: Designing a Count-Controlled Loop with the For Statement 191(10)
Calculating a Running Total 201(4)
Sentinels 205(4)
In the Spotlight: Using a Sentinel 206(3)
Nested Loops 209(8)
Review Questions 211(3)
Programming Exercises 214(3)
Functions 217(40)
Introduction to Functions: Generating Random Numbers 217(8)
In the Spotlight: Using Random Numbers 221(2)
In the Spotlight: Using Random Numbers to Represent Other Values 223(2)
Writing Your Own Functions 225(15)
In the Spotlight: Modularizing with Functions 232(8)
More Library Functions 240(17)
Review Questions 251(2)
Programming Exercises 253(4)
Input Validation 257(12)
Garbage In, Garbage Out 257(1)
The Input Validation Loop 258(7)
In the Spotlight: Designing an Input Validation Loop 260(5)
Defensive Programming 265(4)
Review Questions 266(2)
Programming Exercises 268(1)
Arrays 269(54)
Array Basics 269(14)
In the Spotlight: Using Array Elements in a Math Expression 276(7)
Sequentially Searching an Array 283(6)
Processing the Contents of an Array 289(14)
In the Spotlight: Processing an Array 296(7)
Parallel Arrays 303(4)
In the Spotlight: Using Parallel Arrays 304(3)
Two-Dimensional Arrays 307(9)
In the Spotlight: Using a Two-Dimensional Array 311(5)
Arrays of Three or More Dimensions 316(7)
Review Questions 317(3)
Programming Exercises 320(3)
Sorting and Searching Arrays 323(38)
The Bubble Sort Algorithm 323(14)
In the Spotlight: Using the Bubble Sort Algorithm 330(7)
The Selection Sort Algorithm 337(6)
The Insertion Sort Algorithm 343(6)
The Binary Search Algorithm 349(12)
In the Spotlight: Using the Binary Search Algorithm 353(2)
Review Questions 355(3)
Programming Exercises 358(3)
Files 361(52)
Introduction to File Input and Output 361(12)
Using Loops to Process Files 373(10)
In the Spotlight: Working with Files 378(5)
Using Files and Arrays 383(1)
Processing Records 384(17)
In the Spotlight: Adding and Displaying Records 388(4)
In the Spotlight: Searching for a Record 392(2)
In the Spotlight: Modifying Records 394(4)
In the Spotlight: Deleting Records 398(3)
Control Break Logic 401(12)
In the Spotlight: Using Control Break Logic 403(4)
Review Questions 407(3)
Programming Exercises 410(3)
Menu-Driven Programs 413(46)
Introduction to Menu-Driven Programs 413(11)
Modularizing a Menu-Driven Program 424(5)
Using a Loop to Repeat the Menu 429(19)
In the Spotlight: Designing a Menu-Driven Program 434(14)
Multiple-Level Menus 448(11)
Review Questions 454(2)
Programming Exercises 456(3)
Text Processing 459(22)
Introduction 459(2)
Character-By-Character Text Processing 461(14)
In the Spotlight: Validating a Password 464(6)
In the Spotlight: Formatting and Unformatting Telephone Numbers 470(5)
Review Questions 475(2)
Programming Exercises 477(4)
Recursion 481(22)
Introduction to Recursion 481(3)
Problem Solving with Recursion 484(4)
Examples of Recursive Algorithms 488(15)
Review Questions 498(3)
Programming Exercises 501(2)
Object-Oriented Programming 503(46)
Procedural and Object-Oriented Programming 503(4)
Classes 507(11)
Using the Unified Modeling Language to Design Classes 518(3)
Finding the Classes and Their Responsibilities in a Problem 521(10)
In the Spotlight: Finding the Classes in a Problem 521(4)
In the Spotlight: Determining Class Responsibilities 525(6)
Inheritance 531(8)
Polymorphism 539(10)
Review Questions 543(4)
Programming Exercises 547(2)
GUI Applications and Event-Driven Programming 549(20)
Graphical User Interfaces 549(3)
Designing the User Interface for a GUI Program 552(7)
In the Spotlight: Designing a Window 557(2)
Writing Event Handlers 559(10)
In the Spotlight: Designing an Event Handler 562(2)
Review Questions 564(2)
Programming Exercises 566(3)
Appendix A ASCII/Unicode Characters 569(1)
Appendix B Flowchart Symbols 570(3)
Appendix C Answers to Checkpoint Questions (located on the CD that accompanies this book)
Index 573
Preface xiii
Introduction to Computers and Programming 1(28)
Introduction 1(1)
Hardware 2(5)
How Computers Store Data 7(5)
How a Program Works 12(8)
Types of Software 20(9)
Review Questions 23(6)
Input, Processing, and Output 29(46)
Designing a Program 29(5)
Output, Input, and Variables 34(9)
Variable Assignment and Calculations 43(13)
In the Spotlight: Calculating a Percentage 47(3)
In the Spotlight: Calculating an Average 50(3)
In the Spotlight: Converting a Math Formula to a Programming Statement 53(3)
Variable Declarations and Data Types 56(6)
Named Constants 62(1)
Hand Tracing a Program 63(1)
Documenting a Program 64(11)
In the Spotlight: Using Named Constants, Style Conventions, and Comments 66(2)
Review Questions 68(4)
Programming Exercises 72(3)
Modules 75(40)
Introduction to Modules 75(3)
Defining and Calling a Module 78(10)
In the Spotlight: Defining and Calling Modules 84(4)
Local Variables 88(2)
Passing Arguments to Modules 90(14)
In the Spotlight: Passing an Argument to a Module 95(5)
In the Spotlight: Passing an Argument by Reference 100(4)
Global Variables and Global Constants 104(11)
In the Spotlight: Using Global Constants 105(4)
Review Questions 109(4)
Programming Exercises 113(2)
Decision Structures and Boolean Logic 115(48)
Introduction to Decision Structures 115(10)
In the Spotlight: Using the If-Then Statement 122(3)
Dual Alternative Decision Structures 125(6)
In the Spotlight: Using the If-Then-Else Statement 126(5)
Comparing Strings 131(4)
Nested Decision Structures 135(7)
In the Spotlight: Multiple Nested Decision Structures 138(4)
The Case Structure 142(5)
In the Spotlight: Using a Case Structure 145(2)
Logical Operators 147(7)
Boolean Variables 154(9)
Review Questions 155(4)
Programming Exercises 159(4)
Repetition Structures 163(54)
Introduction to Repetition Structures 163(1)
Condition-Controlled Loops: While, Do-While, and Do-Until 164(19)
In the Spotlight: Designing a While Loop 169(9)
In the Spotlight: Designing a Do-While Loop 178(5)
Count-Controlled Loops and the For Statement 183(18)
In the Spotlight: Designing a Count-Controlled Loop with the For Statement 191(10)
Calculating a Running Total 201(4)
Sentinels 205(4)
In the Spotlight: Using a Sentinel 206(3)
Nested Loops 209(8)
Review Questions 211(3)
Programming Exercises 214(3)
Functions 217(40)
Introduction to Functions: Generating Random Numbers 217(8)
In the Spotlight: Using Random Numbers 221(2)
In the Spotlight: Using Random Numbers to Represent Other Values 223(2)
Writing Your Own Functions 225(15)
In the Spotlight: Modularizing with Functions 232(8)
More Library Functions 240(17)
Review Questions 251(2)
Programming Exercises 253(4)
Input Validation 257(12)
Garbage In, Garbage Out 257(1)
The Input Validation Loop 258(7)
In the Spotlight: Designing an Input Validation Loop 260(5)
Defensive Programming 265(4)
Review Questions 266(2)
Programming Exercises 268(1)
Arrays 269(54)
Array Basics 269(14)
In the Spotlight: Using Array Elements in a Math Expression 276(7)
Sequentially Searching an Array 283(6)
Processing the Contents of an Array 289(14)
In the Spotlight: Processing an Array 296(7)
Parallel Arrays 303(4)
In the Spotlight: Using Parallel Arrays 304(3)
Two-Dimensional Arrays 307(9)
In the Spotlight: Using a Two-Dimensional Array 311(5)
Arrays of Three or More Dimensions 316(7)
Review Questions 317(3)
Programming Exercises 320(3)
Sorting and Searching Arrays 323(38)
The Bubble Sort Algorithm 323(14)
In the Spotlight: Using the Bubble Sort Algorithm 330(7)
The Selection Sort Algorithm 337(6)
The Insertion Sort Algorithm 343(6)
The Binary Search Algorithm 349(12)
In the Spotlight: Using the Binary Search Algorithm 353(2)
Review Questions 355(3)
Programming Exercises 358(3)
Files 361(52)
Introduction to File Input and Output 361(12)
Using Loops to Process Files 373(10)
In the Spotlight: Working with Files 378(5)
Using Files and Arrays 383(1)
Processing Records 384(17)
In the Spotlight: Adding and Displaying Records 388(4)
In the Spotlight: Searching for a Record 392(2)
In the Spotlight: Modifying Records 394(4)
In the Spotlight: Deleting Records 398(3)
Control Break Logic 401(12)
In the Spotlight: Using Control Break Logic 403(4)
Review Questions 407(3)
Programming Exercises 410(3)
Menu-Driven Programs 413(46)
Introduction to Menu-Driven Programs 413(11)
Modularizing a Menu-Driven Program 424(5)
Using a Loop to Repeat the Menu 429(19)
In the Spotlight: Designing a Menu-Driven Program 434(14)
Multiple-Level Menus 448(11)
Review Questions 454(2)
Programming Exercises 456(3)
Text Processing 459(22)
Introduction 459(2)
Character-By-Character Text Processing 461(14)
In the Spotlight: Validating a Password 464(6)
In the Spotlight: Formatting and Unformatting Telephone Numbers 470(5)
Review Questions 475(2)
Programming Exercises 477(4)
Recursion 481(22)
Introduction to Recursion 481(3)
Problem Solving with Recursion 484(4)
Examples of Recursive Algorithms 488(15)
Review Questions 498(3)
Programming Exercises 501(2)
Object-Oriented Programming 503(46)
Procedural and Object-Oriented Programming 503(4)
Classes 507(11)
Using the Unified Modeling Language to Design Classes 518(3)
Finding the Classes and Their Responsibilities in a Problem 521(10)
In the Spotlight: Finding the Classes in a Problem 521(4)
In the Spotlight: Determining Class Responsibilities 525(6)
Inheritance 531(8)
Polymorphism 539(10)
Review Questions 543(4)
Programming Exercises 547(2)
GUI Applications and Event-Driven Programming 549(20)
Graphical User Interfaces 549(3)
Designing the User Interface for a GUI Program 552(7)
In the Spotlight: Designing a Window 557(2)
Writing Event Handlers 559(10)
In the Spotlight: Designing an Event Handler 562(2)
Review Questions 564(2)
Programming Exercises 566(3)
Appendix A ASCII/Unicode Characters 569(1)
Appendix B Flowchart Symbols 570(3)
Appendix C Answers to Checkpoint Questions (located on the CD that accompanies this book)
Index 573
- 名称
- 类型
- 大小
光盘服务联系方式: 020-38250260 客服QQ:4006604884
云图客服:
用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问
Video Player
×
Audio Player
×
pdf Player
×
亲爱的云图用户,
光盘内的文件都可以直接点击浏览哦
无需下载,在线查阅资料!