Program Development in Java: Abstraction, Specification, and Object-Oriented Des
暫譯: Java 程式開發:抽象、規範與物件導向設計

Barbara Liskov, John Guttag

  • 出版商: Addison Wesley
  • 出版日期: 2000-06-16
  • 售價: $3,180
  • 貴賓價: 9.5$3,021
  • 語言: 英文
  • 頁數: 464
  • 裝訂: Hardcover
  • ISBN: 0201657686
  • ISBN-13: 9780201657685
  • 相關分類: Java 程式語言Object-oriented
  • 無法訂購

買這商品的人也買了...

商品描述


Description

The topic of this book is more efficient and effective programming practice. If students can learn how to apply abstraction, specification, and object-oriented design in constructing even smaller programs, they will have learned the methodology urgently needed today for component-based and object-oriented software engineering. The methodology, which specifically shows students how to decompose a programming problem into parts and then how to build a desired program from independent modules, is especially critical for larger programs, often worked on by teams. The book illustrates particular techniques with implementations in Java (a brief introduction to Java is included for those not already familiar with the language). Beginning with smaller programs, to make sure the basic methodology is understood, the book then shows how to apply the same techniques for high-quality programming-in-the-large.

Back to Top


Appropriate Courses

Programming Methodology, Software Design and Development, CS III (an emerging course), CS II (at better schools), Software Engineering (where programming-oriented).

Back to Top


Table Of Contents

1. Introduction.
Decomposition and Abstraction.
Abstraction.
Abstraction by Parameterization.
Abstraction by Specification.
Kinds of Abstractions.

The Remainder of the Book.
Exercises.


2. Understanding Objects in Java.
Program Structure.
Packages.
Objects and Variables.
Mutability.
Method Call Semantics.

Type Checking.
Type Hierarchy.
Conversions and Overloading.

Dispatching.
Types.
Primitive Object Types.
Vectors.

Stream Input/Output.
Java Applications.
Exercises.

3. Procedural Abstraction.
The Benefits of Abstraction.
Specifications.
Specifications of Procedural Abstractions.
Implementing Procedures.
Designing Procedural Abstractions.
Summary.
Exercises.

4. Exceptions.
Specifications.
The Java Exception Mechanism.
Exception Types.
Defining Exception Types.
Throwing Exceptions.
Handling Exceptions.
Coping with Unchecked Exceptions.

Programming with Exceptions.
Reflecting and Masking.

Design Issues.
When to Use Exceptions.
Checked versus Unchecked Exceptions.

Defensive Programming.
Summary.
Exercises.

5. Data Abstraction.
Specifications for Data Abstractions.
Specification of IntSet.
The Poly Abstraction.

Using Data Abstractions.
Implementing Data Abstractions.
Implementing Data Abstractions in Java.
Implementation of IntSet.
Implementation of Poly.
Records.

Additional Methods.
Aids to Understanding Implementations.
The Abstraction Function.
The Representation Invariant.
Implementing the Abstraction Function and Rep Invariant.
Discussion.

Properties of Data Abstraction Implementations.
Benevolent Side Effects.
Exposing the Rep.

Reasoning about Data Abstractions.
Preserving the Rep Invariant.
Reasoning about Operations.
Reasoning at the Abstract Level.

Design Issues.
Mutability.
Operation Categories.
Adequacy.

Locality and Modifiability.
Summary.
Exercises.

6. Iteration Abstraction.
Iteration in Java.
Specifying Iterators.
Using Iterators.
Implementing Iterators.
Rep Invariants and Abstraction Functions for Generators.
Ordered Lists.
Design Issues.
Summary.
Exercises.

7. Type Hierarchy.
Assignment and Dispatching.
Assignment.
Dispatching.

Defining a Type Hierarchy.
Defining Hierarchies in Java.
A Simple Example.
Exception Types.
Abstract Classes.
Interfaces.
Multiple Implementations.
Lists.
Polynomials.

The Meaning of Subtypes.
The Methods Rule.
The Properties Rule.
Equality.

Discussion of Type Hierarchy.
Summary.
Exercises.

8. Polymorphic Abstractions.
Polymorphic Data Abstractions.
Using Polymorphic Data Abstractions.
Equality Revisited.
Additional Methods.
More Flexibility.
Polymorphic Procedures.
Summary.
Exercises.

9. Specifications.
Specifications and Specificand Sets.
Some Criteria for Specifications.
Restrictiveness.
Generality.
Clarity.

Why Specifications?
Summary.
Exercises.

10. Testing and Debugging.
Testing
Black-Box Testing.
Glass-Box Testing.

Testing Procedures.
Testing Iterators.
Testing Data Abstractions.
Testing Polymorphic Abstractions.
Testing a Type Hierarchy.
Unit and Integration Testing.
Tools for Testing.
Debugging.
Defensive Programming.
Summary.
Exercises.

11. Requirements Analysis.
The Software Life Cycle.
Requirements Analysis Overview.
The Stock Tracker.
Summary.
Exercises.

12. Requirements Specifications.
Data Models.
Subsets.
Relations.
Textual Information.

Requirements Specifications.
Requirements Specification for Stock Tracker.
The Data Model.
Stock Tracker Specification.

Requirements Specification for a Search Engine.
Summary.
Exercises.

13. Design.
An Overview of the Design Process.
The Design Notebook.
The Introductory Section.
The Abstraction Sections.

The Structure of Interactive Programs.
Starting the Design.
Discussion of the Method.
Continuing the Design.
The Query Abstraction.
The WorldTable Abstraction.
Finishing Up.
Interaction between FP and UI.
Module Dependency Diagrams versus Data Models.
Review and Discussion.
Inventing Helpers.
Specifying Helpers.
Continuing the Design.
The Design Notebook.

Top-Down Design.
Summary.
Exercises.

14. Between Design and Implementation.
Evaluating a Design.
Correctness and Performance.
Structure.

Ordering the Program Development Process.
Summary.
Exercises.

15. Design Patterns.
Hiding Object Creation.
Neat Hacks.
Flyweights.
Singletons.
The State Pattern.

The Bridge Pattern.
Procedures Should Be Objects Too.
Composites.
Traversing the Tree.

The Power of Indirection.
Publish/Subscribe.
Abstracting Control.

Summary.
Exercises.

Glossary.
Index. 0201657686T04062001



Back to Top

商品描述(中文翻譯)

描述
本書的主題是更有效率和更有效的程式設計實踐。如果學生能學會如何在構建更小的程式時應用抽象、規範和物件導向設計,他們將學會當今急需的組件式和物件導向軟體工程方法論。這種方法論特別展示了學生如何將程式問題分解為各個部分,然後如何從獨立模組構建所需的程式,這對於通常由團隊合作的大型程式尤其重要。本書用 Java 實現了特定技術(對於不熟悉該語言的人,包含了簡要的 Java 介紹)。從較小的程式開始,以確保基本方法論的理解,然後本書展示如何將相同的技術應用於大型高品質程式設計。

適合的課程
程式設計方法論、軟體設計與開發、CS III(新興課程)、CS II(在較好的學校)、軟體工程(以程式設計為導向)。

目錄
1. 介紹。
分解與抽象。
抽象。
透過參數化的抽象。
透過規範的抽象。
抽象的種類。
本書的其餘部分。
練習。

2. 理解 Java 中的物件。
程式結構。
套件。
物件與變數。
可變性。
方法呼叫語義。
類型檢查。
類型層級。
轉換與重載。
派發。
類型。
原始物件類型。
向量。
流輸入/輸出。
Java 應用程式。
練習。

3. 程序抽象。
抽象的好處。
規範。
程序抽象的規範。
實現程序。
設計程序抽象。
總結。
練習。

4. 異常。
規範。
Java 異常機制。
異常類型。
定義異常類型。
拋出異常。
處理異常。
應對未檢查的異常。
使用異常進行編程。
反射與遮蔽。
設計問題。
何時使用異常。
檢查與未檢查的異常。
防禦性編程。
總結。
練習。

5. 數據抽象。
數據抽象的規範。
IntSet 的規範。
多項式抽象。
使用數據抽象。
實現數據抽象。
在 Java 中實現數據抽象。
IntSet 的實現。
多項式的實現。
記錄。
附加方法。
理解實現的幫助。
抽象函數。
表示不變式。
實現抽象函數和表示不變式。
討論。
數據抽象實現的屬性。
有益的副作用。
曝露表示。
對數據抽象的推理。
保持表示不變式。
對操作的推理。
在抽象層級的推理。
設計問題。
可變性。
操作類別。
充分性。
局部性與可修改性。
總結。
練習。

6. 迭代抽象。
Java 中的迭代。
指定迭代器。
使用迭代器。
實現迭代器。
生成器的表示不變式和抽象函數。
有序列表。
設計問題。
總結。
練習。

7. 類型層級。
指派與派發。
指派。
派發。
定義類型層級。
在 Java 中定義層級。
一個簡單的例子。
異常類型。
抽象類。
介面。
多重實現。
列表。
多項式。
子類型的意義。
方法規則。
屬性規則。
相等性。
類型層級的討論。
總結。
練習。

8. 多型抽象。
多型數據抽象。
使用多型數據抽象。
相等性重訪。
附加方法。
更多靈活性。
多型程序。
總結。
練習。

9. 規範。
規範與特定集。
規範的一些標準。
限制性。
一般性。
清晰性。
為什麼需要規範?
總結。
練習。

10. 測試與除錯。
測試
黑盒測試。
玻璃盒測試。
測試程序。
測試迭代器。
測試數據抽象。
測試多型抽象。
測試類型層級。
單元測試與整合測試。
測試工具。
除錯。
防禦性編程。
總結。
練習。

11. 需求分析。
軟體生命週期。
需求分析概述。
股票追蹤器。
總結。
練習。

12. 需求規範。
數據模型。
子集。
關係。
文本信息。
需求規範。
股票追蹤器的需求規範。
數據模型。
股票追蹤器規範。
搜尋引擎的需求規範。
總結。
練習。

13. 設計。
設計過程概述。
設計筆記本。
介紹部分。
抽象部分。
互動程式的結構。
開始設計。
方法討論。
繼續設計。
查詢抽象。
WorldTable 抽象。
完成。
FP 與 UI 之間的互動。
模組依賴圖與數據模型。
回顧與討論。
發明輔助工具。
指定輔助工具。
繼續設計。
設計筆記本。
自上而下的設計。
總結。
練習。

14. 設計與實現之間。
評估設計。
正確性與性能。
結構。
排序程式開發過程。
總結。
練習。

15. 設計模式。
隱藏物件創建。
精巧的黑客。
享元模式。
單例模式。
狀態模式。
橋接模式。
程序也應該是物件。
組合模式。
遍歷樹。
間接的力量。
發布/訂閱。
抽象控制。
總結。
練習。

詞彙表。
索引。 0201657686T04062001