Register your product to gain access to bonus material or receive a coupon.
Provides students with a consistent global reference that helps to (1) measure one's progress, (2) understand which language features support each role/goal, and (3) focus on a limited set of object-oriented features that expand in an orderly and logical manner over time. Ex.___
Provides students with a critical link between knowledge questions (such as the end-of-section questions) and skill-oriented work (such as major programming projects). Ex.___
Gives students immediate feedback, and helps instructors to easily develop quizzes. Ex.___
Helps students to write interesting programs that have windows, simple graphics, and simple animations from the start. Ex.___
Object-Oriented Software Design and Construction with Java® integrates a presentation of concepts of object-oriented programming, issues in software engineering, and features of the Java language. The text strikes a good balance between a book that assumes familiarity with programming, and a book that assumes no background in computer science material. This approach is particularly excellent for the secondyear student (or above) since it assumes the reader has a basic knowledge of C syntax and programming. This textbook offers a comprehensive scope. It integrates better design strategies and software engineering issues along with more compelling examples and problems. The book also discusses UML (Unified Modeling Language) and describes how to build graphical user interfaces using the new Swing library in Java 2.
Features:
1. Basic Concepts.
2. Using Objects of a Single Class.
3. Using Objects of Different Classes.
4. Implementing a New Class.
5. Designing and Developing a Class.
6. Inheritance.
7. Building User Interfaces in Java.
8. Input/Output in Java.
9. Threads.
Audience
This book is intended for undergraduate students. It is assumed that the reader has had a single preceding programming course. Students at Virginia Tech have used drafts of this book in a first semester sophomore year course. In particular, only an understanding of basic data structures (e.g., linked lists, stacks) is needed, and that only in the second half of the course. A specific course on data structures is not required.
This book focuses on the object-oriented programming aspects of Java. It is assumed that the syntax of the basic programming constructs (decisions, iterations, etc.) are known, or at least learned independently of this book. Since Java borrows much of its syntax from the "C" language, a basic familiarity with these programming constructs in "C" is adequate. Only a basic familiarity with "C" is required; it is not necessary to be an expert in this language. A person competent in a statically typed procedural language other than "C" should be able to understand most of what is contained in the book. Doing the programming exercises, of course, requires at least a minimal proficiency with the basic programming constructs of Java.
The motivating examples and programming exercises do not assume familiarity with concepts or intuitions derived from experiences that would normally only occur during the junior or senior years of study. The problems are drawn from common graphical user interface (GUI) systems and from a model of a very simple ecological system. Anyone who has used a GUI-based document preparation systems, spreadsheet, drawing tool, or the like, has the necessary context for the user interface examples and problems. No special background is required for the ecological simulation.
Intent
The most important intent is to support a person's study of object-oriented programming in Java. While only the Java language is described, the objectoriented concepts on which Java is based are realized in numerous other objectoriented programming languages including C++, Smalltalk, and Eiffel. The initial chapter describes the broad concepts of object-oriented programming without specific reference to Java. The broader object-oriented context is also reflected by the use of terms from different languages and analysis methods. For example, the terms "member function," "method," "operation," and "action" are used interchangeably. While distinctions can be drawn between these terms, the distinctions are not real differences for beginning students of object-oriented programming.
An important secondary intent is to raise the student's level of programming competence by emphasizing:
reuse
The value of software reuse is conveyed by initial and pervasive reuse of software in the presentation, exercises, and projects. In fact, few exercise calls for the development of a program "from scratch." Almost all exercises use a provided set of classes and, later, an extensive class library from the Java distribution.
tools/techniques
The tools and techniques needed to develop systems are presented in addition to the language features. Knowing the language and writing the code is only half (sometimes much less than half) of what is required to build a real system. Developers must also cope with testing, debugging, and documentation. While these are ideas are often covered in a senior-level software engineering course, the foundations for that more advanced study are established here.
GUI library
Through the exercises and projects students learn object-oriented techniques for building GUI-based systems. The techniques and, later, the Java Swing toolkit, are intended to become a part of the student's repertoire, being used in programming projects in subsequent courses. This knowledge can be easily transferred to other similar class libraries.
event-driven systems
Exposure is given to event-driven systems. Beginning programming courses typically deal with problems where the program being written is totally in control at run-time. However, in event-driven systems (like user interfaces, interactive applications, operating systems, command and control systems) the program is not in total control. Instead, the program reacts to (is driven by) external events. Seeing event-driven systems broadens the student's experience and perspective, and provides a source of intuitions useful in later courses on operating systems, computer architecture, networking, and similar courses that involve asynchronous events.
Pedagogy
Applets and On-Line Questions
http://www.prenhall.com/kafura
The web site that accompanies this text contain both interactive questions and Java applets. These additions enhance the quality of the conceptual material through:
animation
Applets provide a visual representation that is often better able to communicate a concept than a static figure, a series of static (before/after) figures, or simply a written description. This is particularly true for concepts that are inherently involved with change or action. The "picture" that a teacher has in their own head is better conveyed to a learner in this graphical and animated form.
interaction
Applets that have active elements (buttons, menus, etc.) allow the learner to gain experience with a concept in a way that allows the learner to have control of the experience. In particular, applets of this form are valuable in giving experience with constructive, programming concepts without having to be concerned with the syntax and other non-essential issues.
feedback
Simple multiple-choice in-line tests can allow the learner to gain a measure of their understanding and develop a sense of confidence. This means is more efficient and less loaded with psychological baggage than in-class quizzes or exams.
Beyond their ability to better convey certain concepts, the on-line questions and applets help to create an engaging learning environment.
The jake Environment
The software that accompanies the text contains a simple, visual programming environment named jake. The jake environment contains icons that provide a visual depiction of a set of classes that are used in examples and exercises in the text. Objects of these classes can be created either by direct manipulation of the icons or by programs using the library provided with jake. Associations formed between objects are represented by a line drawn between the corresponding icons. The jake environment is described in the text as are all of the classes with which it operates.
Mastery Exercises
Almost all sections are immediately followed by a set of exercises. Each exercise is designed to be completed in a short amount of time. In an ideal case, at least some of the exercises for a section should be done before proceeding to the next section. More realistically, students and instructors are encouraged to arrange deadlines that support the practice of completing as many as possible of the exercises in each set in a timely manner. The exercises are designed to instill mastery through practice. In this sense the exercises are primarily an aid to learning and not a tool for evaluation and grading. The exercises are important. Each exercise is focused on a single, new idea. A student who understands the concepts in a section, pays little penalty in time to complete exercises for that section. A student who has some misunderstandings (or who simply learns best by working with the concept in practice) benefits from the task of working through the exercises.
Continuing Theme Examples
Two recurring examples are used throughout the book that focus on the themes of graphical user interfaces and ecological simulation. The continuity of the examples allows a more complete solution to a problem to be developed as new concepts and techniques are introduced. The examples are also more complete, substantial, and coherent a collection of unrelated trivial examples. The examples and problems are designed to be engaging and to strengthen the relationship between the "objects" in the program and their "real world" counterparts. For example, the first programming exercises involve the display of a window on the screen or the simulation of a simple predator in a simulated ecology. Subsequent early exercises involve moving and resizing the window and introducing prey to form a predatorprey model. In approximately three weeks the student is building simple systems that involve buttons, timed events, and text displays in the graphical user interface domain, and more complicated scenarios in the ecological simulation. Problems of this kind are more engaging of a student's interest than the more common objects like Date, String, Address, etc. In addition, the ability to see visually how the window moves on the screen in direct response to applying the moveTo method in the class from which the window was created, strengthens the notion that an objects models directly its real world counterpart.
UML and Swing
As new object-oriented structures are introduced, the corresponding representation in the Unified Modeling Language (UML) is given. Since UML is a large and complex language, only its basic features are described and used in the text. Included are UML diagrams for classes, objects, associations, aggregations, interfaces, sequences, state transitions, and inheritance. This set forms the core of UML and is sufficient to allow students to describe reasonably complex systems.
The text includes an introduction to the latest Swing library that was introduced with the Java 1.2 release. Since Swing is a rich and complex library, only the basics of the Swing components are presented. The presented components are sufficient to construct a wide range of interesting user interfaces. The presentation lays the foundation for further study of Swing in book devoted exclusively to this purpose. A pair of simple applications, one for a simple graphical drawing tool and one for a simple text editing tool, are used to illustrate the basic user interface control provided in Swing. Extensions of these two tools are used as the source of numerous programming exercises.
Unique Organization
The material is organized in two related ways: by concept and by role. The conceptual organization as given in the first chapter is based on four concepts that underlay object-oriented programming languages: abstraction, separation, composition and generalization. The first chapter allows all of these concepts to be understood at a very high level before proceeding with any of the detailed material in Java. However, it is also possible (and usually preferable) to interleave a study of the concepts with a study of how they concepts are realized in Java and how they are put to use to build systems.
The second organization is a progression of the various roles assumed by a programmer in writing software. The roles are:
In this presentation the single class represents a graphical user interface window or the predator. Many important concepts can be presented naturally within this simple and intuitive context (e.g., overloaded methods, constructors, scope, static vs. dynamic objects). Note that from the first sentence the importance of classes and objects is stressed.
user of multiple existing classes
Composition is seen as a way to build systems by combining together interacting objects. At this point the student builds several small time-driven systems with button and text interactions or simulations involving predators and prey.
implementor of a single class
It is only at this stage that the internal structure of a class is revealed. It is emphasized here that the role of an implementor involves more than coding, it also involves design, documentation, debugging, and incremental testing and development.
implementor of multiple related classes
The chapter about this role introduces inheritance as a mechanism for sharing implementation and/or interfaces among a set of related classes.
Acknowledgments
A number of people have contributed to the development of this book. Much of the work in writing the on-line test questions and answers was done by Mr. Michael Gussett. Several graduate teaching assistants contributed to the book through their interactions during the teaching of the class for which this book was targeted. Two graduate students helped with the initial development of the applets, Sadanand Sahasrabudhe and Srinivas Gaddam, that were later extended by Ketan Shah. Philip Isenhour made a major contribution to converting the code examples to be compatible with Java 2. Tom Plunkett has used the on-line development version of this book in teaching several courses at Virginia Tech's Northern Virginia Center. THANKS TO ALL!
Many individuals in the Prentice-Hall organization were also of great help and encouragement including Alan Apt, Ana Terry, Scott Disanno, and Toni Holm.
Software
The complete code for the examples used in the book is available. In addition, a simplified execution environment, named jake, is provided for early programming of graphical user interface exercises. This environment allows simple but interesting interfaces to be constructed without having to be concerned with all of the underlying and distracting detail. The environment also provides for graphical representation of object created by the program and direct manipulation of these objects.
Comments
Comments, helpful suggestions and criticism are welcomed. Send email to kafura@cs.vt.edu or by postal mail at:
Department of Computer Science
Virginia Tech
Blacksburg, VA 24061
Dennis Kafura
Blacksburg, Virginia