Fifth Starting Out with Edition Programming Logic & Design

Fifth

Edition

Starting Out with

Programming

Logic &

Design

A01_GADD1155_05_SE_FM.indd 1

27/01/2018 09:40

A01_GADD1155_05_SE_FM.indd 2

27/01/2018 09:40

Fifth

Edition

Starting Out with

Programming

Logic &

Design

Tony Gaddis

Haywood Community College

330 Hudson Street, NY 10013

A01_GADD1155_05_SE_FM.indd 3

27/01/2018 09:40

Senior Vice President Courseware Portfolio Management: Marcia Horton

Director, Portfolio Management: Engineering, Computer Science & Global Editions: Julian Partridge

Specialist, Higher Ed Portfolio Management: Matt Goldstein

Portfolio Management Assistant: Meghan Jacoby

Managing Content Producer: Scott Disanno

Content Producer: Carole Snyder

Web Developer: Steve Wright

Rights and Permissions Manager: Ben Ferrini

Manufacturing Buyer, Higher Ed, Lake Side Communications Inc (LSC): Maura Zaldivar-Garcia

Inventory Manager: Ann Lam

Product Marketing Manager: Yvonne Vannatta

Field Marketing Manager: Demetrius Hall

Marketing Assistant: Jon Bryant

Cover Designer: Joyce Wells, jWellsDesign

Full-Service Project Management: Mohamed Hameed, SPi Global

Composition: SPi Global

Copyright ? 2019 by Pearson Education, Inc. or its affiliates. All Rights Reserved. Printed in the United States of America.

This publication is protected by copyright, and permission should be obtained from the publisher prior to any prohibited

reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical,

photocopying, recording, or otherwise. For information regarding permissions, request forms and the appropriate contacts

within the Pearson Education Global Rights & Permissions department, please visit permissions/.

Unless otherwise indicated herein, any third-party trademarks that may appear in this work are the property of their

respective owners and any references to third-party trademarks, logos or other trade dress are for demonstrative or

descriptive purposes only. Such references are not intended to imply any sponsorship, endorsement, authorization, or

promotion of Pearson¡¯s products by the owners of such marks, or any relationship between the owner and Pearson

Education, Inc. or its affiliates, authors, licensees or distributors.

Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those

designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in

initial caps or all caps.

Microsoft and/or its respective suppliers make no representations about the suitability of the information contained in the

documents and related graphics published as part of the services for any purpose. All such documents and related graphics

are provided ¡°as is¡± without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties

and conditions with regard to this information, including all warranties and conditions of merchantability. Whether express,

implied or statutory, fitness for a particular.

Purpose, title and non-infringement. In no event shall Microsoft and/or its respective suppliers be liable for any special,

indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an

action of contract. Negligence or other tortious action, arising out of or in connection with the use or performance of

information available from the services.

The documents and related graphics contained herein could include technical inaccuracies or typographical errors. Changes

are periodically added to the information herein. Microsoft and/or its respective suppliers may make improvements and/or

changes in the product(s) and/or the program(s) described herein at any time partial screen shots may be viewed in full

within the software version specified.

Microsoft? Windows?, and Microsoft Office? are registered trademarks of the Microsoft Corporation in the U.S.A. and

other countries. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation.

Library of Congress Cataloging-in-Publication Data

Names: Gaddis, Tony, author.

Title: Starting out with programming logic and design / with Tony Gaddis, Haywood Community College.

Other titles: Starting out with programming logic & design

Description: Fifth edition. | New York, NY Pearson Education, Inc., [2019] | Earlier editions published under title: Starting

out with programming logic & design. | Includes index.

Identifiers: LCCN 2017054391| ISBN 978-0-13-480115-5 | ISBN 0-13-480115-6

Subjects: LCSH: Computer programming.

Classification: LCC QA76.6 .G315 2019 | DDC 005.1¡ªdc23 LC record available at

1

18

ISBN 10:

0-13-480115-6

ISBN 13: 978-0-13-480115-5

A01_GADD1155_05_SE_FM.indd 4

27/01/2018 09:40

Brief Contents

Preface

xiii

Acknowledgments

xxi

About the Author

xxiii

Chapter 1

Introduction to Computers and Programming 1

Chapter 2

Input, Processing, and Output

Chapter 3

Modules 103

Chapter 4

Decision Structures and Boolean Logic 157

Chapter 5

Repetition Structures 217

Chapter 6

Functions

Chapter 7

Input Validation

Chapter 8

Arrays

Chapter 9

Sorting and Searching Arrays 419

Chapter 10 Files

27

283

333

351

469

Chapter 11 Menu-Driven Programs 543

Chapter 12 Text Processing

Chapter 13 Recursion

595

623

Chapter 14 Object-Oriented Programming 649

Chapter 15 GUI Applications and Event-Driven Programming 715

Appendix A ASCII/Unicode Characters 747

Appendix B Flowchart Symbols 749

Appendix C Pseudocode Reference 751

Appendix D Converting Decimal Numbers to Binary

Appendix E Answers to Checkpoint Questions

765

767

Index 783

v

A01_GADD1155_05_SE_FM.indd 5

27/01/2018 09:40

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download