A Computer Science Tapestry - Duke Computer Science

Jun 7, 1999 - After receiving his A. B. degree from Dartmouth College, he taught high ... falls on in any year, and a forty-line program to print a calendar for any year. Using .... Chapter 1 is an overview of computer science and programming.
4MB Sizes 6 Downloads 933 Views
June 7, 1999 10:10

owltex

Sheet number 1 Page number i

magenta black

A Computer Science Tapestry Exploring Programming and Computer Science with C++

June 7, 1999 10:10

owltex

Sheet number 2 Page number ii

magenta black

ii

A Computer Science Tapestry Exploring Programming and Computer Science with C++ Second Edition

Owen L. Astrachan Duke University

Boston Burr Ridge,IL Dubuque,IA Madison,WI New York San Francisco St. Louis Bankok Bogotá Caracas Lisbon London Madrid Mexico City Milan New Delhi Seoul Singapore Sydney Taipei Toronto

June 7, 1999 10:10

owltex

Sheet number 3 Page number iii

magenta black

iii Front matter

June 7, 1999 10:10

owltex

Sheet number 4 Page number iv

iv Copyright information

magenta black

June 7, 1999 10:10

owltex

Sheet number 5 Page number v

magenta black

v

About the Author Owen L. Astrachan is Associate Professor of the Practice of Computer Science at Duke University and the department’s Director of Undergraduate Studies for Teaching and Learning. After receiving his A. B. degree from Dartmouth College, he taught high school for seven years before returning to graduate school. He received his Ph.D. in Computer Science from Duke in 1992. Professor Astrachan was a member of the Duke programming team that placed fourth in the world in the ACM programming contest in 1989 and coached the third place team in 1994. He was the chief Reader for the Advanced Placement Computer Science Exam from 1990 to 1994. Professor Astrachan has written many technical and pedagogical articles and has been the Principal Investigator in three NSF-sponsored educational projects: “The Applied Apprenticeship Approach: An Object-Oriented/Object-Based Framework for CS2,” “CURIOUS: Center for Undergraduate Education and Research: Integration through Performance and Visualization,” and “Using and Developing Design Patterns.” A well-regarded teacher, Professor Astrachan received the 1995 Robert B. Cox Distinguished Teaching in Science Award.

June 7, 1999 10:10

owltex

Sheet number 6 Page number vi

magenta black

vi To my teachers, colleagues, and friends, especially to those who are all three, for educating, arguing, laughing, and helping.

To Laura and Ethan

June 7, 1999 10:10

owltex

Sheet number 7 Page number vii

magenta black

Preface The Tapestry Viewed from Afar This book is designed for a first course1 in computer science that uses C++ as the language by which programming is studied. My goal in writing the book has not been to cover the syntax of a large language like C++, but to leverage the best features of the language using sound practices of programming and pedagogy in the study of computer science and software design. My intent is that mastering the material presented here will provide: A strong grounding in the analysis, construction, and design of programs and programming. A means for honing problem-solving skills associated with the study of computer programming and a taste of both the science and engineering aspects of programming. An introduction to computer science that gives the student more of an idea of what the discipline is about than most introductory programming texts. In particular, this is a book designed to teach programming using C++, not a book designed to teach C++. Nevertheless, I expect students who use this book will become reasonably adept C++ programmers. Object-oriented programming is not a programmer’s panacea, although it can make some jobs much easier. To mix metaphors, learning to program is a hard task, no matter how you slice it—it takes time to master, just as bread takes time to rise. The mater