简介
Summary:
Publisher Summary 1
An Object-Oriented Approach to Programming Logic and Design, Second Edition is a language-independent introduction to programming logic using object-oriented principles. It introduces programming concepts and enforces good style and logical thinking. Joyce Farrell is well-known for her Programming Logic and Design book, which takes a procedural approach to programming. An Object-Oriented Approach to Programming Logic and Design, Second Edition offers similar topical coverage and pedagogy, but it introduces the user to the world of object-oriented programming. Designed for a first course in programming, no programming experience is required and the text does not focus on any particular language.
目录
Preface p. XIII
An Overview of Computers and Logic p. 1
Understanding Computer Components and Operations p. 2
Understanding the Evolution of Programming Techniques p. 5
Understanding the Programming Process p. 7
Understanding the problem p. 7
Envisioning the objects p. 7
Planning the logic p. 8
Coding the program p. 8
Translating the program code p. 8
Testing the program p. 9
Putting the program into production p. 10
Maintaining the program p. 11
Retiring the program p. 11
Using Flowcharts and Pseudocode Statements p. 11
Creating an Application Class With A main () Method p. 12
Using and Naming Variables p. 15
Assigning Values to Variables p. 16
Understanding Data Types p. 18
Understanding Various Forms of Input p. 21
Chapter Summary p. 24
Key Terms p. 25
Review Questions p. 28
Exercises p. 30
Case Project p. 32
Up for Discussion p. 32
Understanding Structure p. 33
Understanding the Need to Repeat Program Instructions p. 34
Stopping a Program from Executing Infinitely p. 36
Understanding Unstructured Spaghetti Code p. 39
Understanding the Three Basic Structures: Sequence, Selection, and Loop p. 41
The Sequence Structure p. 41
The Selection Structure p. 41
The Loop Structure p. 42
Building Structured Methods p. 43
Using a Priming Read p. 46
Understanding the Reasons for Structure p. 51
Recognizing Structure p. 53
Describing Three Special Structures-Case, Do-While, and Do-Until p. 58
The Case Structure p. 58
The Do-While and Do-Until Loops p. 60
Introduction to Methods p. 62
Chapter Summary p. 66
Key Terms p. 67
Review Questions p. 68
Exercises p. 71
Case Project p. 74
Up for Discussion p. 74
Making Decisions p. 75
Evaluating Boolean Expressions to Make Comparisons p. 76
Using the Relational Comparison Operators p. 80
Understanding and Logic p. 84
Nesting and Decisions for Efficiency p. 86
Combining Decisions in an and Selection p. 88
Avoiding Common Errors in an and Selection p. 89
Understanding or Logic p. 90
Writing or Decisions for Efficiency p. 92
Combining Decisions in an or Selection p. 93
Avoiding Common Errors in an or Selection p. 94
Making Selections Within Ranges p. 98
Understanding Common Errors Using Range Checks p. 101
Understanding Precedence When Combining and and or Selections p. 104
Understanding the Case Structure p. 106
Using Decision Tables p. 108
Chapter Summary p. 112
Key Terms p. 113
Review Questions p. 114
Exercises p. 118
Case Project p. 122
Up for Discussion p. 123
Looping p. 125
Understanding the Advantages of Looping p. 126
Controlling Loops with Counters and Sentinel Values p. 126
Using a Definite While Loop with a Counter p. 127
Using an Indefinite While Loop with a Sentinel value p. 128
Using Nested Loops p. 132
Mixing Constant and Variable Sentinel Values p. 134
Avoiding Common Loop Mistakes p. 138
Mistake: Neglecting to Initialize the Loop Control Variable p. 138
Mistake: Neglecting to Alter the Loop Control Variable p. 140
Mistake: Using the Wrong Comparison with the Loop Control Variable p. 142
Mistake: Including Statements Inside the Loop that Belong Outside the Loop p. 142
Using a for Loop: Counter-Controlled Repetition p. 146
Using Posttest Loops p. 147
Recognizing the Characteristics Shared by All Loops p. 149
Common Loop Applications p. 150
Using a Loop to Accumulate Totals p. 150
Using a Loop to Validate Data p. 153
Chapter Summary p. 155
Key Terms p. 156
Review Questions p. 156
Exercises p. 160
Case Project p. 163
Up for Discussion p. 164
Arrays p. 165
Understanding Arrays and How They Occupy Computer Memory p. 166
How Arrays Occupy Computer Memory p. 166
Manipulating an Array to Replace Nested Decisions p. 167
Using a Named Constant to Refer to an Array's Size p. 174
Array Declaration and Initialization p. 174
Variable and Constant Arrays p. 176
Searching an Array for an Exact Match p. 179
Using Parallel Arrays p. 181
Improving Search Efficiency Using an Early Exit p. 184
Searching an Array for a Range Match p. 185
Remaining Within Array Bounds p. 188
Using a for Loop to Process Arrays p. 192
Chapter Summary p. 193
Key Terms p. 193
Review Questions p. 194
Exercises p. 197
Case Project p. 201
Up for Discussion p. 202
Using Methods p. 203
Creating a Simple Method p. 204
Understanding Local and Global Variables and Constants p. 206
Creating Methods That Require A Single Argument p. 210
Creating Methods That Require Multiple Arguments p. 214
Creating Methods That Return Values p. 216
Passing an Array to a Method p. 220
Overloading Methods p. 227
Avoiding Ambiguous Methods p. 230
Using Prewritten, Built-in Methods p. 232
Chapter Summary p. 233
Key Terms p. 234
Review Questions p. 235
Exercises p. 238
Case Project p. 240
Up For Discussion p. 241
Object-Oriented Programming Concepts-Classes and Objects p. 243
An Overview of Some Principles of Object-Oriented Programming p. 244
Polymorphism p. 245
Inheritance p. 246
Encapsulation p. 246
Defining Classes and Creating Class Diagrams p. 247
Creating Class Diagrams p. 249
The set methods p. 251
The get Methods p. 253
Other methods p. 253
Understanding Public and Private Access p. 254
Organizing Classes p. 257
Understanding Instance Methods p. 258
Understanding Static, Class Methods p. 262
An Introduction to Constructors p. 263
Constructors with Parameters p. 266
Overloading Class Methods p. 267
Using Objects p. 268
Understanding Destructors p. 271
Understanding Composition p. 272
One Example of Using Predefined Classes: Creating Gui Objects p. 273
Reviewing the Advantages of Object-Oriented Programming p. 274
Chapter Summary p. 274
Key Terms p. 275
Review Questions p. 277
Exercises p. 280
Case Project p. 282
Up for Discussion p. 284
Event-Driven Programming with Graphical User Interfaces p. 285
Understanding Event-Driven Programming p. 286
User-Initiated Actions and Gui Components p. 288
Designing Graphical User Interfaces p. 290
The Interface Should Be Natural and Predictable p. 291
The Interface Should Be Attractive, Easy to Read, and Nondistracting p. 291
To Some Extent, It's Helpful If the User Can Customize Your Applications p. 292
The Program Should Be Forgiving p. 292
The GUI Is Only a Means to an End p. 292
Modifying the Attributes of Gui Components p. 292
The Steps to Developing an Event-Driven Application p. 293
Creating Storyboards p. 294
Defining the Objects in an Object Dictionary p. 295
Defining the Connections Between the User Screens p. 296
Planning the Logic p. 296
Understanding Multithreading p. 300
Creating Animation p. 301
Chapter Summary p. 304
Key Terms p. 304
Review Questions p. 305
Exercises p. 308
Case Project p. 309
Up for Discussion p. 309
Object Concepts: Polymorphism and Inheritance p. 311
Understanding Inheritance p. 312
Understanding Inheritance Terminology p. 314
Accessing Private Members of a Parent Class p. 316
Overriding Base Class Methods p. 321
Understanding how Constructors Are Called During Inheritance p. 325
Understanding How a Derived Class Object "Is An" Instance of the Base Class p. 327
Using Inheritance to Achieve Good Software Design p. 328
Chapter Summary p. 329
Key Terms p. 330
Review Questions p. 331
Exercises p. 334
Case Project p. 336
Up for Discussion p. 336
Exception Handling p. 337
Learning About Exceptions p. 338
Understanding the Limitations of Traditional Error Handling p. 340
Tyring Code and Catching Exceptions p. 340
Throwing and Catching Multiple Exceptions p. 343
Using the finally Block p. 345
Understanding the Advantages of Exception Handling p. 347
Tracing Exceptions Through the Call Stack p. 350
A Case Study: Tracing the source of an Exception p. 351
Creating Your Own Exceptions p. 353
Chapter Summary p. 356
Key Terms p. 357
Review Questions p. 357
Exercises p. 360
Case Project p. 362
Up for Discussion p. 363
System Modeling with the Uml p. 365
Understanding the Need for System Modeling p. 366
What is the Uml? p. 366
Using Use Case Diagrams p. 368
Using Class and Object Diagrams p. 373
Using Sequence and Communication Diagrams p. 376
Using State Machine Diagrams p. 377
Using Activity Diagrams p. 378
Using Component and Deployment Diagrams p. 380
Diagramming Exception Handling p. 381
Deciding When to Use Uml and Which Uml Diagrams to Use p. 382
Chapter Summary p. 383
Key Terms p. 383
Review Questions p. 385
Exercises p. 387
Case Project p. 388
Up for Discussion p. 389
Advanced Array Concepts p. 391
Understanding the Need for Sorting Records p. 392
Understanding How to Swap Two Values p. 393
Using a Bubble Sort p. 394
Sorting a List of Variable Size p. 401
Refining the Bubble Sort by Reducing Unnecessary Comparisons p. 404
Refining the Bubble Sort by Eliminating Unnecessary Passes p. 406
Using an Insertion Sort p. 408
Using a Selection Sort p. 410
Declaring an Array of Objects p. 412
Sorting Arrays of Objects p. 413
Using Two-Dimensional and Multidimensional Arrays p. 416
Using a Built-In Array Class p. 420
Chapter Summary p. 421
Key Terms p. 422
REview Questions p. 423
Exercises p. 426
Case Project p. 429
Up for Discussion p. 430
Solving Difficult Structuring Problems p. 433
Understanding Numbering Systems and Computer Codes p. 443
Using a Large Decision Table p. 449
Software Testing and Data Validation p. 457
Glossary p. 463
Index p. 475
An Overview of Computers and Logic p. 1
Understanding Computer Components and Operations p. 2
Understanding the Evolution of Programming Techniques p. 5
Understanding the Programming Process p. 7
Understanding the problem p. 7
Envisioning the objects p. 7
Planning the logic p. 8
Coding the program p. 8
Translating the program code p. 8
Testing the program p. 9
Putting the program into production p. 10
Maintaining the program p. 11
Retiring the program p. 11
Using Flowcharts and Pseudocode Statements p. 11
Creating an Application Class With A main () Method p. 12
Using and Naming Variables p. 15
Assigning Values to Variables p. 16
Understanding Data Types p. 18
Understanding Various Forms of Input p. 21
Chapter Summary p. 24
Key Terms p. 25
Review Questions p. 28
Exercises p. 30
Case Project p. 32
Up for Discussion p. 32
Understanding Structure p. 33
Understanding the Need to Repeat Program Instructions p. 34
Stopping a Program from Executing Infinitely p. 36
Understanding Unstructured Spaghetti Code p. 39
Understanding the Three Basic Structures: Sequence, Selection, and Loop p. 41
The Sequence Structure p. 41
The Selection Structure p. 41
The Loop Structure p. 42
Building Structured Methods p. 43
Using a Priming Read p. 46
Understanding the Reasons for Structure p. 51
Recognizing Structure p. 53
Describing Three Special Structures-Case, Do-While, and Do-Until p. 58
The Case Structure p. 58
The Do-While and Do-Until Loops p. 60
Introduction to Methods p. 62
Chapter Summary p. 66
Key Terms p. 67
Review Questions p. 68
Exercises p. 71
Case Project p. 74
Up for Discussion p. 74
Making Decisions p. 75
Evaluating Boolean Expressions to Make Comparisons p. 76
Using the Relational Comparison Operators p. 80
Understanding and Logic p. 84
Nesting and Decisions for Efficiency p. 86
Combining Decisions in an and Selection p. 88
Avoiding Common Errors in an and Selection p. 89
Understanding or Logic p. 90
Writing or Decisions for Efficiency p. 92
Combining Decisions in an or Selection p. 93
Avoiding Common Errors in an or Selection p. 94
Making Selections Within Ranges p. 98
Understanding Common Errors Using Range Checks p. 101
Understanding Precedence When Combining and and or Selections p. 104
Understanding the Case Structure p. 106
Using Decision Tables p. 108
Chapter Summary p. 112
Key Terms p. 113
Review Questions p. 114
Exercises p. 118
Case Project p. 122
Up for Discussion p. 123
Looping p. 125
Understanding the Advantages of Looping p. 126
Controlling Loops with Counters and Sentinel Values p. 126
Using a Definite While Loop with a Counter p. 127
Using an Indefinite While Loop with a Sentinel value p. 128
Using Nested Loops p. 132
Mixing Constant and Variable Sentinel Values p. 134
Avoiding Common Loop Mistakes p. 138
Mistake: Neglecting to Initialize the Loop Control Variable p. 138
Mistake: Neglecting to Alter the Loop Control Variable p. 140
Mistake: Using the Wrong Comparison with the Loop Control Variable p. 142
Mistake: Including Statements Inside the Loop that Belong Outside the Loop p. 142
Using a for Loop: Counter-Controlled Repetition p. 146
Using Posttest Loops p. 147
Recognizing the Characteristics Shared by All Loops p. 149
Common Loop Applications p. 150
Using a Loop to Accumulate Totals p. 150
Using a Loop to Validate Data p. 153
Chapter Summary p. 155
Key Terms p. 156
Review Questions p. 156
Exercises p. 160
Case Project p. 163
Up for Discussion p. 164
Arrays p. 165
Understanding Arrays and How They Occupy Computer Memory p. 166
How Arrays Occupy Computer Memory p. 166
Manipulating an Array to Replace Nested Decisions p. 167
Using a Named Constant to Refer to an Array's Size p. 174
Array Declaration and Initialization p. 174
Variable and Constant Arrays p. 176
Searching an Array for an Exact Match p. 179
Using Parallel Arrays p. 181
Improving Search Efficiency Using an Early Exit p. 184
Searching an Array for a Range Match p. 185
Remaining Within Array Bounds p. 188
Using a for Loop to Process Arrays p. 192
Chapter Summary p. 193
Key Terms p. 193
Review Questions p. 194
Exercises p. 197
Case Project p. 201
Up for Discussion p. 202
Using Methods p. 203
Creating a Simple Method p. 204
Understanding Local and Global Variables and Constants p. 206
Creating Methods That Require A Single Argument p. 210
Creating Methods That Require Multiple Arguments p. 214
Creating Methods That Return Values p. 216
Passing an Array to a Method p. 220
Overloading Methods p. 227
Avoiding Ambiguous Methods p. 230
Using Prewritten, Built-in Methods p. 232
Chapter Summary p. 233
Key Terms p. 234
Review Questions p. 235
Exercises p. 238
Case Project p. 240
Up For Discussion p. 241
Object-Oriented Programming Concepts-Classes and Objects p. 243
An Overview of Some Principles of Object-Oriented Programming p. 244
Polymorphism p. 245
Inheritance p. 246
Encapsulation p. 246
Defining Classes and Creating Class Diagrams p. 247
Creating Class Diagrams p. 249
The set methods p. 251
The get Methods p. 253
Other methods p. 253
Understanding Public and Private Access p. 254
Organizing Classes p. 257
Understanding Instance Methods p. 258
Understanding Static, Class Methods p. 262
An Introduction to Constructors p. 263
Constructors with Parameters p. 266
Overloading Class Methods p. 267
Using Objects p. 268
Understanding Destructors p. 271
Understanding Composition p. 272
One Example of Using Predefined Classes: Creating Gui Objects p. 273
Reviewing the Advantages of Object-Oriented Programming p. 274
Chapter Summary p. 274
Key Terms p. 275
Review Questions p. 277
Exercises p. 280
Case Project p. 282
Up for Discussion p. 284
Event-Driven Programming with Graphical User Interfaces p. 285
Understanding Event-Driven Programming p. 286
User-Initiated Actions and Gui Components p. 288
Designing Graphical User Interfaces p. 290
The Interface Should Be Natural and Predictable p. 291
The Interface Should Be Attractive, Easy to Read, and Nondistracting p. 291
To Some Extent, It's Helpful If the User Can Customize Your Applications p. 292
The Program Should Be Forgiving p. 292
The GUI Is Only a Means to an End p. 292
Modifying the Attributes of Gui Components p. 292
The Steps to Developing an Event-Driven Application p. 293
Creating Storyboards p. 294
Defining the Objects in an Object Dictionary p. 295
Defining the Connections Between the User Screens p. 296
Planning the Logic p. 296
Understanding Multithreading p. 300
Creating Animation p. 301
Chapter Summary p. 304
Key Terms p. 304
Review Questions p. 305
Exercises p. 308
Case Project p. 309
Up for Discussion p. 309
Object Concepts: Polymorphism and Inheritance p. 311
Understanding Inheritance p. 312
Understanding Inheritance Terminology p. 314
Accessing Private Members of a Parent Class p. 316
Overriding Base Class Methods p. 321
Understanding how Constructors Are Called During Inheritance p. 325
Understanding How a Derived Class Object "Is An" Instance of the Base Class p. 327
Using Inheritance to Achieve Good Software Design p. 328
Chapter Summary p. 329
Key Terms p. 330
Review Questions p. 331
Exercises p. 334
Case Project p. 336
Up for Discussion p. 336
Exception Handling p. 337
Learning About Exceptions p. 338
Understanding the Limitations of Traditional Error Handling p. 340
Tyring Code and Catching Exceptions p. 340
Throwing and Catching Multiple Exceptions p. 343
Using the finally Block p. 345
Understanding the Advantages of Exception Handling p. 347
Tracing Exceptions Through the Call Stack p. 350
A Case Study: Tracing the source of an Exception p. 351
Creating Your Own Exceptions p. 353
Chapter Summary p. 356
Key Terms p. 357
Review Questions p. 357
Exercises p. 360
Case Project p. 362
Up for Discussion p. 363
System Modeling with the Uml p. 365
Understanding the Need for System Modeling p. 366
What is the Uml? p. 366
Using Use Case Diagrams p. 368
Using Class and Object Diagrams p. 373
Using Sequence and Communication Diagrams p. 376
Using State Machine Diagrams p. 377
Using Activity Diagrams p. 378
Using Component and Deployment Diagrams p. 380
Diagramming Exception Handling p. 381
Deciding When to Use Uml and Which Uml Diagrams to Use p. 382
Chapter Summary p. 383
Key Terms p. 383
Review Questions p. 385
Exercises p. 387
Case Project p. 388
Up for Discussion p. 389
Advanced Array Concepts p. 391
Understanding the Need for Sorting Records p. 392
Understanding How to Swap Two Values p. 393
Using a Bubble Sort p. 394
Sorting a List of Variable Size p. 401
Refining the Bubble Sort by Reducing Unnecessary Comparisons p. 404
Refining the Bubble Sort by Eliminating Unnecessary Passes p. 406
Using an Insertion Sort p. 408
Using a Selection Sort p. 410
Declaring an Array of Objects p. 412
Sorting Arrays of Objects p. 413
Using Two-Dimensional and Multidimensional Arrays p. 416
Using a Built-In Array Class p. 420
Chapter Summary p. 421
Key Terms p. 422
REview Questions p. 423
Exercises p. 426
Case Project p. 429
Up for Discussion p. 430
Solving Difficult Structuring Problems p. 433
Understanding Numbering Systems and Computer Codes p. 443
Using a Large Decision Table p. 449
Software Testing and Data Validation p. 457
Glossary p. 463
Index p. 475
- 名称
- 类型
- 大小
光盘服务联系方式: 020-38250260 客服QQ:4006604884
云图客服:
用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问
Video Player
×
Audio Player
×
pdf Player
×
亲爱的云图用户,
光盘内的文件都可以直接点击浏览哦
无需下载,在线查阅资料!