|
 |
|
 |
 |
Object-Oriented Programming featuring Graphical Applications in Java
|
by Michael J. Laszlo
Sales Rank: 237596
|
List Price: $96.60
$86.94
At Amazon

|
|
Paperback: 468 pages
Publisher: Addison Wesley July 22, 2001
Language: English
ISBN-10: 0201726270
ISBN-13: 978-0201726275
Product Dimensions:
9.2 x 7.2 x 1.1 inches
Shipping Weight: 1.8 pounds
Back Cover Copy
Understanding object-oriented concepts is critical to the practice of modern-day software development. Object-Oriented Programming Featuring Graphical Applications in Java explains the key concepts in clear terms and illustrates with examples, many of which are drawn from two-dimensional computer graphics. It assumes limited previous experience with Java and no previous experience with UML or Java 2D. /I> Features: - Key object-oriented concepts presented using Java 2D, Java's application programming interface for two-dimensional graphics
- Interactive programs that take input via textual commands and through graphical user interface based on Swing
- A subset of UML that illustrates program designs
- Stepped-out exercises that interleave theory and practice
- Design patterns, focusing on the template method, iterator, and composite patterns, that relate to the graphics examples in the book
- Object-oriented frameworks that use the AWT and Swing to build programs with graphical user interfaces
- A package of over 60 classes and interfaces for building and rendering 2-D geometries
- Online code and documentation
Excerpt. © Reprinted by permission. All rights reserved.
The goal of this book is to explore the principal ideas of object-oriented programming using the Java programming language. Object-oriented programming is based on the object model, under which knowledge and behaviors are encapsulated in objects. This programming model has taken hold in recent years due to its effectiveness for coping with program complexity (when used properly), and due to the proliferation of languages such as Java, C++, and Smalltalk, that support the object model.
Although object-oriented programming has been around for several decades, embodied in such early languages as Simula and Smalltalk, new programmers often first encounter the object model while learning Java. We use Java in this book to connect the rich but often-abstract ideas of object-oriented programming to concrete examples. Java provides a clear notation for expressing these ideas, a complement to English prose. Moreover, because you can code, compile, and run Java programs, the language serves as a vehicle for exploring and experimenting. Most of the book's examples and exercises involve two-dimensional computer graphics, and many lead to programs that produce images that are interesting and sometimes unexpected. The book's emphasis on 2-D graphics is intended both to engage the reader and to serve as a concrete setting in which to apply new concepts. New material is put to use in the incremental development, over the course of the book, of a new package of graphics-oriented classes and interfaces.
In writing this book, I have assumed that you have a basic knowledge of Java. If this is not the case, you can gain the requisite background by working through any of a number of introductory texts on this programming language. Whereas the present text does not purport to teach Java, it does explain all but the language's most elementary features as each is first used. The book also relies on two additional resources. First, Java's 2D application programming interface (the Java 2D API), which is a part of Java 2, is used to produce two-dimensional graphics. Second, we'll make use of a small subset of the Unified Modeling Language (UML), a notation for representing system designs; specifically, we use class diagrams to show the static structure of systems and sequence diagrams to show object interactions. Features of the Java 2D API and of UML will be introduced as they are needed, and I do not assume that you are familiar with either. Structure of This Book
Chapter 1 introduces the basic concepts of the object model: objects and classes, message passing and methods, and four fundamental mechanisms for software reusecomposition, inheritance, design patterns, and application frameworks. The object model is also placed in the context of other prominent programming models.
Chapter 2 discusses procedural abstraction, whereby a procedure is viewed as an operation whose implementation is hidden. The chapter also covers Java's exception mechanism, and explores two standard programming techniques that rely on procedural abstraction: procedural decomposition (in which a procedure is defined in terms of other operations), and recursion (in which a procedure is defined in terms of the very operation it realizes). Procedures are treated early in this book because of their central role in the object model.
Chapter 3 treats data abstraction, which views a data value as a set of associated operations and a protocol for using these operations, while hiding the data value's internal structure. Under the object model, a data value viewed in this way is an object. The chapter also discusses encapsulationthe practice of grouping together related software elementsand information hiding. The chapter concludes by introducing 2-D computer graphics in Java and by developing a program template for computer graphics applications in Java.
Chapter 4 covers composition, a primary mechanism for software reuse. Using composition, you can define a new class that is composed of other classes, known as its components. Every instance of the composite class owns its components. The chapter also presents a program template for interactive computer graphics applications, for writing programs with which the user interacts in real time.
Chapter 5 covers inheritance, which is used to define a new class that acquires (or inherits) the attributes and behaviors of an existing class, its parent class. The new class is a child class of its parent class. The chapter discusses the three principal forms of inheritance: inheritance for extension (the child class adds new attributes or behaviors to those it inherits); inheritance for specialization (the child class overrides one or more behaviors it inherits); and inheritance for specification (the child class implements one or more behaviors specified, but not implemented by its parent class). The chapter also treats the use of inheritance in building a family of related types; as well as the related topic of polymorphism.
Chapter 6 discusses design patterns, which are descriptions of good design solutions to problems that tend to recur. A design pattern describes the set of software elements that comprise the solution, and how to arrange the software elements. Of the rich array of design patterns developed by the software community, this chapter focuses on three. The iterator pattern provides access to a collection or aggregate while hiding its internal structure. The template method pattern defines an algorithm made up of both concrete and abstract steps; subclasses "flesh out" the algorithm by implementing the abstract steps. And the composite pattern is used to combine objects into hierarchies of primitives and composites, while enabling clients to treat both primitives and composites uniformly. This chapter applies these design patterns to several graphics projects, such as triangulating finite point sets; building constructive area geometry (CAG) trees, which are binary trees that combine 2-D shapes under the Boolean set operations of union, intersection, and difference; and building scene graphs, which are hierarchies of primitive and complex graphical figures. (Although such terse descriptions might make these graphics projects seem abstruse and difficult, this chapter explains these concepts and supplies figures that, you may find, are worth a million words.) This chapter also introduces several additional design patterns and presents a standard scheme for classifying patterns.
Chapter 7 covers application frameworks, whose purpose is to simplify the development of applications in a particular application domain. The programmer develops a custom program by extending and implementing the classes and interfaces supplied by the framework, according to the framework's conventions. This chapter explores the Abstract Window Toolkit ;(AWT), Swing, and Java's event model, which together make up Java's framework for building applications with graphical user interfaces (GUIs). The chapter closes with the development of a GUI-based program for drawing and editing graphical figures. How to Read This Book
The exercises are an integral part of the book. Some exercises challenge you to implement classes relating to recent material. Other exercises ask you to devise programs that employ recently introduced classes and concepts. Most of the material is cumulativeclasses developed in earlier chapters are used in later chapters, and many of the classes and interfaces are incorporated into the graphics-oriented package developed over the course of the book. In some cases, the definition of a class is revised in stages as the book proceeds, in order to put new concepts to use. Supplements
Exercises range from relatively easy questions, to self-contained programming assignments, to fairly involved programming projects. Exercises that are especially important or that introduce material required later in the book are indicated as essential. If you don't attempt to solve the exercises, at least read the important ones.
The graphics package developed in this book is available in its final form from the site http://www.aw.com/cssupport. The Java programs presented in the body of the text are also available from this site, arranged by chapter. The site includes instructions on how to download and install these files. PowerPoint slides of all the figures may be obtained here. Answers to all exercises are available only to instructors through your Addison Wesley Longman sales representative. Acknowledgements
The Graduate School of Computer and Information Sciences (SCIS), Nova Southeastern University, provided both the opportunity to write this book and a congenial, supportive environment. In particular, I am grateful to the dean of SCIS, Edward Lieblein, and to my colleagues, especially Maxine Cohen, Sumitra Mukherjee, and Junping Sun, for their encouragement and support.
I am fortunate to have had the chance to teach courses at SCIS relating to themes in this book, such as object-oriented design, theory of programming languages, and computer graphics. Much of the material that appears in this book was developed for these courses. I am indebted to more students than I can name for their questions and insights. I also wish to thank colleagues and students at the Institute for Mathematics and Computer Science (IMACS).
I am grateful for the reviews prepared by D. Robert Adams (Grand Valley State University), Manuel E. Bermudez (University of Florida), James R. Connolly (California State University Chico), Frank Coyle (Southern Methodist University), Prasun Dewan (University of North Carolina at Chapel Hill), John R. Glover (University of Houston), Chung Lee (California State University Pomona), Ronald McCarty (Penn State Erie, The Behrend College), Song-Min Park (San Diego State University), Shih-Ho Wang (University of California, Davis), and Marvin V Zelkowtiz (University of Maryland). Writing a careful review require
|
Object-Oriented Programming featuring Graphical Applications in Java
List Price: $96.60
Available from Amazon
Price: $86.94

| |
|
|
|
|