World Headquarters
Jones & Bartlett Learning
5 Wall Street
Burlington, MA 01803
978-443-5000
www.jblearning.com
Jones & Bartlett Learning books and products are available through most bookstores and online booksellers. To contact Jones & Bartlett Learning directly, call 800-832-0034, fax 978-443-8000, or visit our website, www.jblearning.com.
Substantial discounts on bulk quantities of Jones & Bartlett Learning publications are available to corporations, professional associations, and other qualified organizations. For details and specific discount information, contact the special sales department at Jones & Bartlett Learning via the above contact information or send an email to .
Copyright 2016 by Jones & Bartlett Learning, LLC, an Ascend Learning Company
All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without written permission from the copyright owner.
The content, statements, views, and opinions herein are the sole expression of the respective authors and not that of Jones & Bartlett Learning, LLC. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not constitute or imply its endorsement or recommendation by Jones & Bartlett Learning, LLC, and such reference shall not be used for advertising or product endorsement purposes. All trademarks displayed are the trademarks of the parties noted herein. Computer Science Illuminated, Seventh Edition is an independent publication and has not been authorized, sponsored, or otherwise approved by the owners of the trademarks or service marks referenced in this product.
There may be images in this book that feature models; these models do not necessarily endorse, represent, or participate in the activities represented in the images. Any screenshots in this product are for educational and instructive purposes only. Any individuals and scenarios featured in the case studies throughout this product may be real or fictitious, but are used for instructional purposes only.
15601-0
Production Credits
VP, Product Management: Amanda Martin
Director of Product Management: Laura Pagluica
Product Assistant: Loren-Marie Durr
Director of Production: Jenny L. Corriveau
Project Specialist, Navigate: Rachel DiMaggio
Project Specialist: Alex Schab
Digital Project Specialist: Angela Dooley
Marketing Manager: Michael Sullivan
Product Fulfillment Manager: Wendy Kilborn
Composition: codeMantra U.S. LLC
Cover Design: Kristin E. Parker
Text Design: Kristin E. Parker
Director, Content Services and Licensing: Joanna Gallant
Rights & Media Manager: Shannon Sheehan
Rights & Media Specialist: Thais Miller
Cover Image (Title Page, Part Opener, Chapter Opener):
Artur Debat/Getty Images; Alan Dyer/Stocktrek Images/Getty Images
Printing and Binding: LSC Communications
Cover Printing: LSC Communications
Library of Congress Cataloging-in-Publication Data
Names: Dale, Nell (Nell B.) author. | Lewis, John, 1963- author.
Title: Computer science illuminated / Nell Dale and John Lewis.
Description: Seventh edition. | Burlington, Massachusetts: Jones & Bartlett
Learning, [2019] | Includes bibliographical references and index.
Identifiers: LCCN 2018023082 | ISBN 9781284155617 (pbk.)
Subjects: LCSH: Computer science.
Classification: LCC QA76 .D285 2019 | DDC 004dc23
LC record available at https://lccn.loc.gov/2018023082
6048
Printed in the United States of America
222120191810987654321
To all the students who will use this book: It is written for you.
Nell Dale
To my wife, Sharon, and our children, Justin, Kayla, Nathan, and Samantha.
John Lewis
Artur Debat/Getty Images; Alan Dyer/Stocktrek Images/Getty Images
Nell Dale, The University of Texas at Austin
Well-respected in the field of computer science education, Nell Dale has served on the faculty of The University of Texas at Austin for more than 25 years and has authored over 40 undergraduate computer science textbooks. After receiving her BS in Mathematics and Psychology from the University of Houston, Nell entered The University of Texas at Austin, where she earned her MA in Mathematics and her PhD in Computer Science. Nell has made significant contributions to her discipline through her writing, research, and service. Nells contributions were recognized in 1996 with the ACM SIGCSE Award for Outstanding Contributions in Computer Science Education and in 2001 with the ACM Karl V. Karlstrom Outstanding Educator Award. She was elected an ACM Fellow in 2010. In 2013, she received the IEEE Taylor L. Booth Education Award. Nell has retired from full-time teaching, giving her more time to write, travel, and play tennis and bridge. She lives in Austin, Texas.
John Lewis, Virginia Tech
John Lewis is a leading educator and author in the field of computer science. He has written a market-leading textbook on Java software and program design. After earning his PhD in Computer Science, John spent 14 years at Villanova University in Pennsylvania. He now teaches computing at Virginia Tech, his alma mater, and works on textbook projects out of his home. He has received numerous teaching awards, including the University Award for Teaching Excellence and the Goff Award for Outstanding Teaching. His professional interests include object-oriented technologies, multimedia, and software engineering. In addition to teaching and writing, John actively participates in the ACM Special Interest Group on Computer Science Education (SIGCSE) and finds time to spend with his family and in his workshop.
Artur Debat/Getty Images; Alan Dyer/Stocktrek Images/Getty Images
BRIEF CONTENTS
Artur Debat/Getty Images; Alan Dyer/Stocktrek Images/Getty Images
CONTENTS
Artur Debat/Getty Images; Alan Dyer/Stocktrek Images/Getty Images
PREFACE
Choice of Topics
In putting together the outline of topics for this CS0 text, we used many sources. We looked at course catalogue descriptions and book outlines, and we administered a questionnaire designed to find out what you, our colleagues, thought should be included in such a course. We asked you and ourselves to do the following:
Please list four topics that you feel students should master in a CS0 course if this is the only computer science course they will take during their college experience.
Please list four topics that you would like students entering your CS1 course to have mastered.
Please list four additional topics that you would like your CS1 students to be familiar with.
The strong consensus that emerged from the intersections of these sources formed the working outline for this book. It serves as a core CS0 text, providing a breadth-first introduction to computing. It is appropriate for use for a course embracing the AP Computer Science Principles curriculum, and alternatively as a companion or lead-in to a programming intensive course.