This is an introductory book for students with no background in programming, which teaches them how to write object-oriented programs. Students first learn programming basics through the use of predefined Graphical User Interface (GUI) objects. By using these predefined objects, they should grasp th
An Object-Oriented Approach to Programming Logic and Design
β Scribed by Joyce Farrell
- Publisher
- Cengage Learning
- Year
- 2012
- Tongue
- English
- Leaves
- 562
- Edition
- 4
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Discover today's most effective guide to developing object-oriented program logic in Farrell's AN OBJECT-ORIENTED APPROACH TO PROGRAMMING LOGIC AND DESIGN, 4E. This book takes a unique, language-independent approach to ensure readers develop a strong foundation in traditional programming principles and object-oriented concepts before learning the details of a specific programming language. The author presents object-oriented programming terminology without highly technical language, making the book understandable even for readers with no previous programming experience. Common business examples and carefully revised chapters clearly illustrate key points. A wealth of updated programming exercises in every chapter provide diverse practice opportunities, while new Video Lessons expand on key topics. Use this book alone or with a language-specific companion that emphasizes C++, Java or Visual Basic.
β¦ Table of Contents
COVER
AN OBJECT-ORIENTED APPROACH TO PROGRAMMING LOGIC AND DESIGN
Brief Contents
Contents
Preface
Organization and Coverage
New in this edition:
Other Features of the Text
Supplementary Material
Instructor Resources
Acknowledgments
CHAPTER 1
Understanding Computer Components and Operations
Understanding Simple Program Logic
Understanding the Evolution of Programming Models
Understanding the Steps in the Programming Process
Analyzing the Program or System
Designing the Program or System
Writing and Testing Programs
Developing Program Logic
Coding the Program
Using Software to Translate the Program into Machine Language
Testing the Program
After the Program is Written and Tested
Using Pseudocode and Flowcharts
Writing Pseudocode
Drawing Flowcharts
Understanding Program Comments
Understanding Programming and User Environments
Understanding Programming Environments
Understanding User Environments
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 2
Creating an Application Class with a mainO Method
Understanding the mainQ Method
Understanding How Programming Languages Reflect Logic
Using Literals, Variables, and Named Constants
Understanding Unnamed, Literal Constants and their Data Types
Working with Variables
Naming Variables
Understanding a Variable's Data Type
Declaring Named Constants
Assigning Values to Variables
Performing Arithmetic Operations
Features of Good Program Design
Using Program Comments
Choosing Identifiers
Designing Clear Statements
Avoiding Confusing Line Breaks
Using Temporary Variables to Clarify Long Statements
Writing Clear Prompts and Echoing Input
Maintaining Good Programming Habits
An Introduction to Structure
An Introduction to Structure
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 3
Evaluating Boolean Expressions
Using Relational Comparison Operators
Pitfall: Using the Wrong Relational Operator
Understanding AND Logic
CHAPTER 3
Making Decisions
Nesting AND Decisions for Efficiency
Understanding AND Logic
Using the AND Operator
Using a Truth Table
Avoiding Common Errors in an AND Selection
Pitfall: Taking Action Without Meeting All Necessary Conditions
Pitfall: Performing an Action Twice When it Should Occur Once
Pitfall: Forgetting to Use a Complete Boolean Expression on Each Side of the AND Operator
Understanding OR Logic
Writing Of? Decisions for Efficiency
Using the OR Operator
Avoiding Common Errors in an OR Selection
Pitfall: Creating Unstructured Logic
Pitfall: Using AND Logic When OR Logic is Needed
Pitfall: Using OR Logic When AND Logic is Needed
Making Selections within Ranges
CHAPTER 3
Making Decisions
Avoiding Common Errors When Using Range Checks
Pitfall: Creation of an Unreachable Path
Pitfall: Performing Comparisons When the Results are Irrelevant
Understanding Precedence When Combining AND and OR Operators
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 4
Understanding the Loop Structure
Using a Loop Control Variable
Using a Definite Loop with a Counter
Using an Indefinite Loop with a Sentinel Value
Using Nested Loops
Using Nested Loops
Avoiding Common Loop Mistakes
Mistake: Neglecting to Initialize the Loop Control Variable
Mistake: Neglecting to Alter the Loop Control Variable
Mistake: Using the Wrong Comparison with the Loop Control Variable
Mistake: Including Statements Inside the Loop that Belong
Outside the Loop
CHAPTER 4
Looping
Using a for Loop
Common Loop Applications
Using a Loop to Accumulate Totals
Using a Loop to Validate Data
Limiting a Reprompting Loop
Validating a Data Type
Validating Reasonableness and Consistency of Data
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 5
Storing Data in Arrays
How Arrays Occupy Computer Memory
How an Array Can Replace Nested Decisions
How an Array Can Replace Nested Decisions
Using Constants with Arrays
Using a Named Constant as the Size of an Array
Using Constants as Array Element Values
Using a Constant as an Array Subscript
Searching an Array for an Exact Match
Searching an Array for an Exact Match
Using Parallel Arrays
Improving Search Efficiency
Searching an Array for a Range Match
Searching an Array for a Range Match
Remaining within Array Bounds
Remaining within Array Bounds
Using a for Loop to Process Arrays
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 6
Understanding the Advantages of Modularization
Modularization Provides Abstraction
Modularization Simplifies the Logic
Modularization Allows Multiple Programmers to Work on a Problem
Modularization Allows You to Reuse Work
Modularizing a Program
Modularizing a Program
Declaring Local and Global Variables and Constants
Creating Methods that Require Parameters
CHAPTER 6
Using Methods
Understanding the Difference Between Passing Arguments by Value and by Reference
Passing by Value
Passing by Reference
Creating Methods that Require Multiple Parameters
an2 C.W LβΒ«. Al Kβr^. βW .wfcA β. - - -M. - - p-v O- - m , b. .Wl"! Β»-Β»β β β β’Β«
Creating Methods that Return a Value
Passing an Array to a Method
Overloading Methods
Avoiding Ambiguous Methods
Using Predefined Methods
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 7
Principles of Object-Oriented Programming
Classes and Objects
Polymorphism
Inheritance
Encapsulation
Defining Classes and Creating Class Diagrams
Creating Class Diagrams
The Set Methods
The Get Methods
Work Methods
Understanding Public and Private Access
Organizing Classes
Understanding Instance Methods
Understanding Static Methods
Using Objects
Understanding Composition
An Example of Using Predefined Classes:
Creating GUI Objects
Reviewing the Advantages of Object-Oriented Programming
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 8
An Introduction to Constructors
Constructors with Parameters
Overloading Instance Methods and Constructors
Understanding Destructors
Understanding Inheritance
Understanding Inheritance Terminology
Accessing Private Members of a Parent Class
Overriding Base Class Methods
Understanding How Constructors are Called
During Inheritance
Understanding How a Derived Class Object βis anβ Instance of the Base Class
Using Inheritance to Achieve Good Software Design
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 9
Understanding Event-Driven Programming
User-Initiated Actions and GUI Components
Designing Graphical User Interfaces
The Interface Should Be Natural and Predictable
The Interface Should Be Attractive, Easy to Read, and Nondistracting
To Some Extent, Itβs Helpful If the User Can Customize Your Applications
The Program Should Be Forgiving
The GUI Is Only a Means to an End
The Steps to Developing an Event-Driven Application
Creating Storyboards
Defining the Storyboard Objects in an Object Dictionary
Defining Connections Between the User Screens
Planning the Logic
Creating Animation
Chapter Summary
Key Terms
Review Questions
Review Questions
Case Projects
CHAPTER 10
Learning About Exceptions
Understanding the Limitations of Traditional Error Handling
Trying Code and Catching Exceptions
Throwing and Catching Multiple Exceptions
Using the finally Block
Understanding the Advantages of Exception Handling
Tracing Exceptions Through the Call Stack
A Case Study: Tracing the Source of an Exception
Creating Your Own Exceptions
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 11
Understanding System Modeling
What is the UML?
Using UML Use Case Diagrams
Using UML Use Case Diagrams
Using UML Class and Object Diagrams
Using Other UML Diagrams
Sequence Diagrams
Communication Diagrams
State Machine Diagrams
Component and Deployment Diagrams
Profile Diagrams
Diagramming Exception Handling
Deciding When to Use the UML and Which UML Diagrams to Use
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
CHAPTER 12
Understanding the Need for Sorting Records
Using the Bubble Sort Algorithm
Understanding Swapping Values
Understanding the Bubble Sort
Sorting a List of Variable Size
Refining the Bubble Sort to Reduce Unnecessary Comparisons
Refining the Bubble Sort to Eliminate Unnecessary Passes
Sorting Data Stored in Parallel Arrays
Sorting Objects
Using the Insertion Sort Algorithm
Using Multidimensional Arrays
Using Multidimensional Arrays
Using Indexed Files and Linked Lists
Using Indexed Files
Using Linked Lists
Chapter Summary
Key Terms
Review Questions
Exercises
Case Projects
APPENDIX A
APPENDIX B
APPENDIX C
The Hexadecimal System
Measuring Storage
Key Terms
APPENDIX D
Understanding the Three Basic Structures
Two Variations on the Basic Structuresβcase and do-while
The case Structure
The do-while Loop
Recognizing the Characteristics Shared by All
Structured Loops
Key Terms
Glossary
B
D
E
F
G
H
I
J
L
N
0
P
R
T
V
Y
Index
s
π SIMILAR VOLUMES
This is an introductory book for students with no background in programming, which teaches them how to write object-oriented programs. Students first learn programming basics through the use of predefined Graphical User Interface (GUI) objects. By using these predefined objects, they should grasp th
C++ Programming: An Object-Oriented Approach has two primary objectives: Teach the basic principles of programming as outlined in the ACM curriculum for a CS1 class and teach the basic constructs of the C++ language. While C++ is a complex and professional language, experience shows that beginning s
The first book published that fully describes object-oriented programming in an accessible manner for a wide range of readers. This new second edition covers the changes that have occurred in Objective C version 4.0, the newest release, and the tools that assist in developing object-oriented softwar
The first book published that fully describes object-oriented programming in an accessible manner for a wide range of readers. This new second edition covers the changes that have occurred in Objective C version 4.0, the newest release, and the tools that assist in developing object-oriented softwar
<p>The second edition of this textbook includes revisions based on the feedback on the first edition. In a new chapter the authors provide a concise introduction to the remainder of UML diagrams, adopting the same holistic approach as the first edition. <p></p><p>Using a case-study-based approach fo