Starting Out with Programming Logic and Design / Edition 2

Paperback (Print)
Rent
Rent from BN.com
$26.19
(Save 75%)
Est. Return Date: 11/21/2014
Buy Used
Buy Used from BN.com
$78.90
(Save 25%)
Item is in good condition but packaging may have signs of shelf wear/aging or torn packaging.
Condition: Used – Good details
Used and New from Other Sellers
Used and New from Other Sellers
from $8.36
Usually ships in 1-2 business days
(Save 92%)
Other sellers (Paperback)
  • All (10) from $8.36   
  • New (4) from $42.81   
  • Used (6) from $8.36   
Close
Sort by
Page 1 of 1
Showing 1 – 3 of 4
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$42.81
Seller since 2011

Feedback rating:

(60)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
PAPERBACK New 0136077730 2nd ed. FREE delivery confirmation and USPS tracking. Daily shipping! !

Ships from: American Fork, UT

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$115.00
Seller since 2014

Feedback rating:

(178)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$115.00
Seller since 2014

Feedback rating:

(178)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing 1 – 3 of 4
Close
Sort by

Overview

Starting Out with Programming Logic and Design, Third 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.

Read More Show Less

Product Details

  • ISBN-13: 9780136077732
  • Publisher: Addison-Wesley
  • Publication date: 10/16/2009
  • Series: Alternative eText Formats Series
  • Edition description: Older Edition
  • Edition number: 2
  • Pages: 600
  • Product dimensions: 7.90 (w) x 9.90 (h) x 0.90 (d)

Meet the Author

Tony Gaddis is the principal author of the Starting Out With . . . series of textbooks. Tony has twenty years of experience teaching computer science courses, primarily at Haywood Community College. He is a highly acclaimed instructor who was previously selected as the North Carolina Community College “Teacher of the Year” and has received the Teaching Excellence award from the National Institute for Staff and Organizational Development. The Starting Out With . . . series includes introductory books covering Programming Logic and Design, C++, Java, Microsoft® Visual Basic, C#®, Python, and Alice, all published by Pearson Addison-Wesley.
Read More Show Less

Table of Contents

Preface xiii
Chapter 1 Introduction to Computers and Programming 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 How Computers Store Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 How a Program Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Types of Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 2 Input, Processing, and Output 29
2.1 Designing a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 Output, Input, and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.3 Variable Assignment and Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 43
IN THE SPOTLIGHT: Calculating a Percentage . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
IN THE SPOTLIGHT: Calculating an Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
IN THE SPOTLIGHT: Converting a Math Formula to a
Programming Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.4 Variable Declarations and Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.5 Named Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.6 Hand Tracing a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.7 Documenting a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
IN THE SPOTLIGHT: Using Named Constants, Style Conventions,
and Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Chapter 3 Modules 75
3.1 Introduction to Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.2 Defining and Calling a Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
IN THE SPOTLIGHT: Defining and Calling Modules . . . . . . . . . . . . . . . . . . . . . . . 84
3.3 Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.4 Passing Arguments to Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
IN THE SPOTLIGHT: Passing an Argument to a Module . . . . . . . . . . . . . . . . . . . . 95
IN THE SPOTLIGHT: Passing an Argument by Reference . . . . . . . . . . . . . . . . . . . 100
3.5 Global Variables and Global Constants . . . . . . . . . . . . . . . . . . . . . . . . . 104
IN THE SPOTLIGHT: Using Global Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Chapter 4 Decision Structures and Boolean Logic 115
4.1 Introduction to Decision Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
IN THE SPOTLIGHT: Using the If-Then Statement . . . . . . . . . . . . . . . . . . . . . . . 122
4.2 Dual Alternative Decision Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
IN THE SPOTLIGHT: Using the If-Then-Else Statement . . . . . . . . . . . . . . . . . . 126
4.3 Comparing Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.4 Nested Decision Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
IN THE SPOTLIGHT: Multiple Nested Decision Structures . . . . . . . . . . . . . . . . . 138
4.5 The Case Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
IN THE SPOTLIGHT: Using a Case Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.6 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4.7 Boolean Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Chapter 5 Repetition Structures 163
5.1 Introduction to Repetition Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 163
5.2 Condition-Controlled Loops: While, Do-While, and Do-Until . . . . . . 164
IN THE SPOTLIGHT: Designing a While Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 169
IN THE SPOTLIGHT: Designing a Do-While Loop . . . . . . . . . . . . . . . . . . . . . . . . 178
5.3 Count-Controlled Loops and the For Statement . . . . . . . . . . . . . . . . . 183
IN THE SPOTLIGHT: Designing a Count-Controlled Loop with the For Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5.4 Calculating a Running Total . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
5.5 Sentinels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
IN THE SPOTLIGHT: Using a Sentinel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
5.6 Nested Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Chapter 6 Functions 217
6.1 Introduction to Functions: Generating Random Numbers . . . . . . . . . . 217
IN THE SPOTLIGHT: Using Random Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 221
IN THE SPOTLIGHT: Using Random Numbers to Represent Other Values . . . . . 223
6.2 Writing Your Own Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
IN THE SPOTLIGHT: Modularizing with Functions . . . . . . . . . . . . . . . . . . . . . . . 232
6.3 More Library Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Chapter 7 Input Validation 257
7.1 Garbage In, Garbage Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
7.2 The Input Validation Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
IN THE SPOTLIGHT: Designing an Input Validation Loop . . . . . . . . . . . . . . . . . . 260
7.3 Defensive Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Chapter 8 Arrays 269
8.1 Array Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
IN THE SPOTLIGHT: Using Array Elements in a Math Expression . . . . . . . . . . . 276
8.2 Sequentially Searching an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
8.3 Processing the Contents of an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
IN THE SPOTLIGHT: Processing an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
8.4 Parallel Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
IN THE SPOTLIGHT: Using Parallel Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
8.5 Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
IN THE SPOTLIGHT: Using a Two-Dimensional Array . . . . . . . . . . . . . . . . . . . . 311
8.6 Arrays of Three or More Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Chapter 9 Sorting and Searching Arrays 323
9.1 The Bubble Sort Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
IN THE SPOTLIGHT: Using the Bubble Sort Algorithm . . . . . . . . . . . . . . . . . . . . 330
9.2 The Selection Sort Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
9.3 The Insertion Sort Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
9.4 The Binary Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
IN THE SPOTLIGHT: Using the Binary Search Algorithm . . . . . . . . . . . . . . . . . . . 353
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Chapter 10 Files 361
10.1 Introduction to File Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . 361
10.2 Using Loops to Process Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
IN THE SPOTLIGHT: Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
10.3 Using Files and Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
10.4 Processing Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
IN THE SPOTLIGHT: Adding and Displaying Records . . . . . . . . . . . . . . . . . . . . . 388
IN THE SPOTLIGHT: Searching for a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
IN THE SPOTLIGHT: Modifying Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
IN THE SPOTLIGHT: Deleting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
10.5 Control Break Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
IN THE SPOTLIGHT: Using Control Break Logic . . . . . . . . . . . . . . . . . . . . . . . . .403
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Chapter 11 Menu-Driven Programs 413
11.1 Introduction to Menu-Driven Programs . . . . . . . . . . . . . . . . . . . . . . . . . 413
11.2 Modularizing a Menu-Driven Program . . . . . . . . . . . . . . . . . . . . . . . . . 424
11.3 Using a Loop to Repeat the Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
IN THE SPOTLIGHT: Designing a Menu-Driven Program . . . . . . . . . . . . . . . . . . 434
11.4 Multiple-Level Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Chapter 12 Text Processing 459
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
12.2 Character-By-Character Text Processing . . . . . . . . . . . . . . . . . . . . . . . . 461
IN THE SPOTLIGHT: Validating a Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
IN THE SPOTLIGHT: Formatting and Unformatting Telephone Numbers . . . . . . 470
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Chapter 13 Recursion 481
13.1 Introduction to Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481
13.2 Problem Solving with Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484
13.3 Examples of Recursive Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .498
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501
Chapter 14 Object-Oriented Programming 503
14.1 Procedural and Object-Oriented Programming . . . . . . . . . . . . . . . . . . . 503
14.2 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
14.3 Using the Unified Modeling Language to Design Classes . . . . . . . . . . . 518
14.4 Finding the Classes and Their Responsibilities in a Problem . . . . . . . . . 521
IN THE SPOTLIGHT: Finding the Classes in a Problem . . . . . . . . . . . . . . . . . . . . 521
IN THE SPOTLIGHT: Determining Class Responsibilities . . . . . . . . . . . . . . . . . . . 525
14.5 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
14.6 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
Chapter 15 GUI Applications and Event-Driven Programming 549
15.1 Graphical User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
15.2 Designing the User Interface for a GUI Program . . . . . . . . . . . . . . . . . . 552
IN THE SPOTLIGHT: Designing a Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
15.3 Writing Event Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
IN THE SPOTLIGHT: Designing an Event Handler . . . . . . . . . . . . . . . . . . . . . . . . 562
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
Programming Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

Appendix A ASCII/Unicode Characters 569
Appendix B Flowchart Symbols 570
Appendix C Answers to Checkpoint Questions (located on the CD that accompanies this book)
Index 573

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)