Which comes first, learning object-oriented design or programming in C++? The authors present an object-oriented approach at the outset as the best way to learn introductory programming concepts. C++ doesn't have to be the top hierarchical level at the end of a programming journey. The object-oriented features of C++ are used as an appropriate foundation for learning to program.
"synopsis" may belong to another edition of this title.
Jo Perry is a Lecturer in the Department of Computer Science at North Carolina State University, where she received her Ph.D in Mathematics. She and Harold Levin were instrumental in the introduction of C++ as the major teaching language of the department. She has been involved as a judge for the ACM Programming Contest Finals since 1988.
Harold Levin is an Associate Professor in the Department of Philosophy and Religion at North Carolina State University. He received his BS in Mathematics from MIT and his Ph.D in Philosophy from MIT. During his years at MIT, he was a systems programmer at Project MAC. He has taught with the Computer Science Department at all levels, including seminars in C++ and object-oriented programming.
0201765640AB04062001
An Introduction to Object-Oriented Design in C++ introduces object-oriented program development from the ground-up. This book helps students develop strong object-oriented design skills from the beginning. rather than forcing students to learn procedural design and then unlearn it when they are later taught object-oriented programming.
The book covers the full range of object-oriented programming topics, from fundamental features common to all general purpose high-level languages, through classes, to inheritance and polymorphism. Students are encouraged to think and design in terms of objects and to structure their code to reflect their designs. The authors introduce students to common difficulties that arise in design and implementations, and then motivate new language features as aids for overcoming those difficulties.
The manuscript for the book has been class-tested over four semesters. Features:
* Begins with object-oriented analysis and design from the very first page
* Introduces predefined objects in Chapter 2; class libraries in Chapter 3; and students create new types of objects by creating their own classes in Chapter 7
* Focuses on the object-oriented approach while introducing functions in the early chapters
* Helps students build on concepts such as design and reusablity by using running examples throughout the book
* Gives a complete picture of object-oriented programming by covering the essential elements of inheritance and polymorphism
0201765640B04062001
Twenty years ago, there were no desktop PCs, most software was batch processed, and most program I/O was for unit records such as card images. Today most computers are desktop machines and we operate in an environment of networks, multimedia, and interactive graphical interfaces. This book is designed for use in introductory computer science courses that acknowledge these widespread and fundamental changes.
A couple of years ago, we heard people asking "Is object-oriented programming just a flash in the pan?" We don't hear this question anymore. Today, we are in the midst of a major paradigm shift affecting almost every aspect of computing --from commercial technology to fundamental theory. Elements of the diverse collection of topics lumped under the general heading "object-oriented" are at the center of the shift and provide the momentum that will determine the direction of the discipline into the next century.
What does all this mean with respect to teaching and learning about software development? Should students learn object-oriented techniques from the start? The answer is yes, even in the earliest portions of their training. Indeed, we think that it would be as counterproductive to teach standard techniques of structured programming early in the curriculum and then add in or switch to object-oriented methodologies in advanced courses as it would have been to first teach students to program in BASIC and later on to introduce structured programming as a portion of a specialized software engineering course. Two major ideas moved us toward the very early introduction of object-oriented concepts. One is that it is vital to take design seriously. The other is that concepts and technologies associated with software reuse are so important that they must be introduced at the earliest opportunity. Where did we start?
We have both been teaching introductory computer science and computer programming to students for more than a decade. Until three years ago, all of our introductory teaching amounted to the same course that has been taught in Pascal since the beginning of structured programming. In the spring semester of 1992, partly because of the political pressure of other engineering departments and partly because of student demand, we taught an introductory course using C++. That first course was strictly experimental. We did not know if we could pull it off.
To make sure that students would not be shortchanged by programming in C++ rather than Pascal, we taught the experimental course as an exact mirror of the introductory course with Pascal. Pascal and C++ lectures were kept in lockstep. The day that Pascal CASE statements were discussed was the same day that C++ switch statements were discussed. The day that procedures were introduced in Pascal lectures, functions were introduced in C++ lectures. The students in Pascal and C++ wrote exactly the same lab assignments. Only the languages were different. No hint of object-oriented development was mentioned in the C++ course.
We came out of that experiment knowing that we had both succeeded and failed. We discovered that beginning students can learn C++ syntax as easily as they can learn Pascal syntax, and they can do traditional top-down design in C++ as easily as they can do it in Pascal. But that experimental course was still a C++ copy of a traditional introductory programming course. It was out of date before it started.
This book began as a result of that experience. We knew that we did not want another Pascal text in C++ clothing. At the same time, we knew that beginning students still have to learn concepts such as control structures and functions that are common to all general-purpose languages. While that knowledge is so ingrained in experienced programmers that many have trouble remembering when they did not know it, we recognize that students are not born knowing those concepts. Our first question was "How can we teach the new paradigms and still cover the fundamental concepts that every programmer knows?" Our answer is "Teach objects early along with the fundamental concepts." It is easy to teach fundamental concepts. What about objects? Introducing object-oriented concepts
This book introduces objects at two levels: design and programming. At the design level, we began by thinking in terms of objects, comparing those objects and their interactions to animated cartoons. This is a comfortable context for most students. It is through this kind of object-think that students can apply their everyday intuition. Students know how to solve all sorts of difficult problems in ordinary life. They ought to be able to use that experience in solving programming problems.
At the programming level, objects can appear in various ways. In the beginning of this book, we use comments to bracket off the parts of programs corresponding to design objects. As we introduce new language features, we rely more on the code without the comments to describe the objects developed in our designs. With classes, we are able to capture in our code exactly what we had in our designs without relying strictly on comments to show us the way.
The focus from the beginning of the text is objects, not classes, and not C++ syntax for defining classes. Objects are concrete. Classes are the abstract mechanism for producing objects. We chose to leave classes until students could first become familiar with functions and control structures. C++ has built-in objects cin and cout that students can use from the start. Furthermore, students find it easy to use class libraries and class type objects quite early. When students can appreciate the need for producing many instances of new types of objects, they are ready to tackle the syntax and conceptual scheme for defining C++ classes. Following through with major object-oriented concepts
Soon after we taught the first course using C++, we overheard some students saying that they knew all about object-oriented programming because they took a one-semester course in programming using C++. We knew they were wrong, but they did not find out until they tried to sell the skills they did not have. Soon, we began hearing from students asking where could they learn the important stuff --i.e., inheritance and polymorphism.
We think students need to see the whole picture in object-oriented program development. More importantly, students think they need to see the whole picture. And that picture includes first class types, inheritance, and polymorphism. Those topics are too important to be relegated to a footnote or a short appendix. Students --and people outside academia --do not think they should be ignored. And we do not think they should be ignored either.
As we remarked earlier, there has been a significant change not only in the economics and sociology of computation but also in what is at the leading edge and what is at the center of the discipline. If you think that the situation in computing today is not essentially different from the situation in the 1970s when Pascal and structured programming were new and important, then you may well be puzzled about why students should learn about objects, classes, inheritance, and polymorphism. However, neither teachers nor students can gain a full appreciation of object-oriented program development without inheritance and polymorphism. A quick map of the book
Novice programmers who want to learn object-oriented program development in C++ from this book should start from the beginning and follow the sequence of chapters as we have laid them out. Experienced C programmers who are determined to read as little as possible can read Chapters 1, 3, and the beginning of Chapter 6 before going to Chapter 7, which gives the first full treatment on class definitions. Experienced Pascal programmers will also find it necessary to learn the syntax introduced in Chapters 2 through 6. Chapters 8 through 11 form the heart of the object-oriented features, syntax, and culture of C++. Chapter 12 introduces the reader to container classes and linked lists. Chapter 13 is a case study of the iterative process that we went through in developing a sophisticated class library.
This book is organized on two different themes. The first theme is design and analysis of programming problems; the second is the C++ tools that are useful in implementing solutions to these problems. Students who successfully complete a programming course should have practical programming skills when they leave the course. But to prevent creating a hacker mentality --going after an immediate solution in the quickest way possible --it is important to show students useful design methodologies from the start.
This book uses the familiar changemaker problem as a running example to illustrate iterations in design, enhancements, and implementation. The initial statement of the problem from Chapter 1 is very simple. As more programming tools become available, the changemaker is reanalyzed and redesigned to incorporate these new tools and to improve either the functionality of the program solution or to improve its organization. For the teacher
This book contains material for a two-semester sequence in introductory design and programming. At North Carolina State University, the first course is organized into large lecture sections (175 students) with small closed labs. We have found that it is reasonable to cover Chapter 1 through the first half of Chapter 7 plus the Stream Appendices (D, E, and F) in a traditional three-semester hour introductory course. Students in four-semester hour courses could cover more material, or simply do the same material in more depth and with more examples.
The laboratory experience is important. Ideally, we would like all low-level syntax topics relegated to the lab. The lecture is a very inefficient way to cover that material. Through laboratories, especially those that have integrated support for software development, students can experiment with the language to see the practical results of the lectures.
We realize that the second course varies tremendously among different schools. The second course at North Carolina State University has traditionally focused more on software engineering concepts than data structures. The material in Chapter 7 through the remainder of the book is appropriate for such a second course.
Comprehensive exercises, varying from straightforward syntax exercises through programming projects are included at the end of every chapter. Answers to all of the exercises except the programming projects are available for instructors upon request from Addison-Wesley. For additional information, see the supplements section following. The programming projects are open-ended and can be modified to suit individual class needs.
We hope that this textbook will be useful not only for students but also for teachers who are just now starting to teach the introductory course using C++. That pedagogical task is not trivial. And it is especially not trivial to those who know C or Pascal and come to realize very late that C++ is not just a new version of C and not just Pascal with classes. Part of what we do in this book is addressed to helping our colleagues, who may be struggling just ahead of their students. We know about that struggle from our own experience.
Problem solving is difficult no matter what the language and what the tools. But be encouraged from our discoveries. The language switch --the syntax switch --is easy. Learning the culture, how good C++ programmers do things, is harder. But the most difficult thing is learning how to think in terms of object-oriented analysis and design as opposed to structured analysis and design. For the student
You will begin learning by solving very simple problems and writing very short programs. Think about the programs that you use and like. If after three months, you still do not have a good idea of how to write such a program, all that indicates is that programming is a broad and deep subject. It will take considerable time and effort before you will realize the goal of having good object-oriented programming skills.
When you begin your work, you will discover ways to organize what you already know and ways to spell out things that you already know how to do. You will discover new ways of looking at problems and devising solutions to them. This book is full of advice on how to learn, what is important, when to exercise old skills, and when to learn new ones. We suggest that you read carefully. Read new material in the book before you go to class. Read it after you attend a lecture. Underline key points. And work problems. Programming is not for spectators.
Do not hesitate to experiment. If you are not sure how a piece of code works, try it out. All of us, even those of us who are professional teachers, are students too. And we learn what we know by falling into lots of holes and making lots of mistakes, just as you are almost certain to do. There is an extensive set of exercises at the end of each chapter. Answers to selected exercises are available via anonymous ftp to ftp.aw. For instructions to download these files, refer to the supplements section following.
Your compiler will not be perfect, and it may not support some features of C++ mentioned in this book. (For example, the type bool is not available on some compilers.) We have tried to warn you in the text where some of our compilers were deficient, and where you might run into the same problems. When possible, we have suggested simple work-arounds. Technical standards
The code in the first seven chapters was tested on all of the following environments. All of the code was tested in at least one UNIX-based environment. Borland Turbo C++ version 3.0 on DOS 5.0 Microsoft Visual C++ version 1.0 (Standard Edition) for Windows 3.1 Symantec C++ version 7.0 on Macintosh, system 7.0 AT&T version 3.0 on a SUN4 using SunOS 4.1 Gnu version 2.6.1 on a DECstation using Ultrix 4.2
The technical terms that we introduce in the text are not ours. Wherever possible, we have tried to conform our use of technical terms with the practice of the C++ community, its epicenter being at Bell Laboratories. We have also tried to conform with the language standards described in Margaret Ellis and Bjarne Stroustrup's Annotated C++ Reference Manual (the ARM), which serves as the base document for the ANSI standardization of C++ currently in progress. In the few places where our code uses an operating system or other system-dependent headers or procedures, we isolated the nonportable features and indicated system dependence with comments.
We have entirely avoided the use of exceptions and exception handling for two reasons. First, exceptions are not as widely implemented in C++ compilers as are the other ARM language features, and standards for exceptions are more in flux than other parts of the language described in the ARM. Second, exception handling is an important addition to the control structures of the structured programming tradition but not an integral part of our central theme --object-oriented program development. Supplements Source code Answers to selected exercises Instructor's solutions access information
To obtain any of the supplement files, ftp to ftp.aw. Log in with user name anonymous and use your internet address as the password. From there, type cd cseng/authors/perry/oop.cs1. Acknowledgments
The authors gratefully acknowledge the help of many people in writing this book. Among our colleagues, Don Martin has been especially encouraging from the start. We doubt that we could have completed our work without the assistance of Susan Jones, who has worked tirelessly to check code, do problems, and suggest ways of formulating ideas. Both Susan and Don have been with us since the inception of this project, always giving constructive criticism and refraining from asking the question "Isn't it done yet?"
We appreciate the willingness of Don Martin, Susan Jones, Carol Miller, and Steve Worth to use a draft manuscript for their classroom text. We thank our students and colleagues alike for serving as guinea pigs in this project. All have provided valuable feedback.
The editorial staff at Addison-Wesley has been very helpful in preparing the final manuscript. Our editor Lynne Cote has offered valuable words of encouragement and has also provided us with a rich reference library from among the numerous excellent Addison-Wesley publications. We thank the authors of those books for pointing out to us and to their other readers the culture and use of object-oriented techniques and C++. In addition, our production supervisor Helen Wythe has been gracious and diligent in dealing with the endless problems of putting the book together.
We have taken advantage of extensive reviewer comments, incorporating many of the suggestions into the book. We thank especially James Adcock, Microsoft Corporation; Vicki H. Allan, Utah State University; Frank Cioch, Oakland University; H. E. Dunsmore, Purdue University; Thomas Hain, University of South Alabama; Dennis Heckman, Portland Community College; Robert Kline, Westchester University; Rayno Niemi, Rochester Institute of Technology; Christopher Skelley, Insight Resources; and Phil Sweany, Michigan Technological University.
Finally, our families have lived with this project almost as much as we have. Lavon and Connie have demonstrated their love for us through their wonderful patience in our extended times away from home. They have had to put up with lost weekends and exhausted spouses for over two years, and they did it almost without complaint.
0201765640P04062001
"About this title" may belong to another edition of this title.
Seller: Better World Books, Mishawaka, IN, U.S.A.
Condition: Good. 1st. Used book that is in clean, average condition without any missing pages. Seller Inventory # 338279-6
Seller: BooksRun, Philadelphia, PA, U.S.A.
Paperback. Condition: Good. First Edition. It's a preowned item in good condition and includes all the pages. It may have some general signs of wear and tear, such as markings, highlighting, slight damage to the cover, minimal wear to the binding, etc., but they will not affect the overall reading experience. Seller Inventory # 0201765640-11-1
Seller: Better World Books Ltd, Dunfermline, United Kingdom
Condition: Very Good. 1st. Ships from the UK. Used book that is in excellent condition. May show signs of wear or have minor defects. Seller Inventory # 4302670-20
Quantity: 1 available
Seller: Romtrade Corp., STERLING HEIGHTS, MI, U.S.A.
Condition: New. This is a Brand-new US Edition. This Item may be shipped from US or any other country as we have multiple locations worldwide. Seller Inventory # ABNR-118788
Seller: Basi6 International, Irving, TX, U.S.A.
Condition: Brand New. New. US edition. Expediting shipping for all USA and Europe orders excluding PO Box. Excellent Customer Service. Seller Inventory # ABEOCT25-64404
Seller: ALLBOOKS1, Direk, SA, Australia
Brand new book. Fast ship. Please provide full street address as we are not able to ship to P O box address. Seller Inventory # SHAK64404
Seller: Books Puddle, New York, NY, U.S.A.
Condition: New. pp. 750. Seller Inventory # 263116656
Seller: Majestic Books, Hounslow, United Kingdom
Condition: New. pp. 750. Seller Inventory # 5779887
Quantity: 1 available
Seller: Biblios, Frankfurt am main, HESSE, Germany
Condition: New. pp. 750. Seller Inventory # 183116666
Quantity: 1 available