SlideServe
Menu
Préférences
© SlideServe · v2026

Abstract Data Type Abstraction: Enhancing Object-Oriented Design

marinel avatar
12 diapositives · 224 Views · Oct 12, 2014

Discover the essence of abstraction in software development, its role in defining conceptual boundaries, and the importance of choosing the right abstractions. Explore examples such as ice makers and client-server contracts, and delve into abstract data types and their operations in Java programming.

Abstract Data Type Abstraction: Enhancing Object-Oriented Design - slide 1
01 / 12Abstract Data Type Abstraction: Enhancing Object-Oriented Design
1 / 17

Télécharger la présentation

Abstract Data Type Abstraction: Enhancing Object-Oriented Design
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. CSC 205 Java Programming II Abstract Data Type

  2. Abstraction • The meaning of abstraction Abstraction arises from a recognition of similarities between certain objects, situations, or processes in the real world, and the decision to concentrate upon these similarities and to ignore for the time being the differences • A definition by Grady Booch An abstraction denotesthe essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer

  3. Abstraction

  4. The Walls – abstraction barrier • An abstraction serves as an separation between an object’s behavior and its implementation – an abstraction barrier • It focuses on the outside view of an object and hide the implementation details • Deciding upon the right set of abstractions for a given domain is the central problem in OO design

  5. The Walls – an example • The ice maker as an abstraction, has the following well-defined behaviors • Output • Crushed ice • Ice cubes • Chilled water • Indicate • Out-of-ice • Input • Water The ice maker in a client’s view – The ways how ice is made and how the dispenser works is unknown

  6. Client-Server Contracts • A collaboration is a one-way interaction between two objects: one plays the client role, the other plays the server role • A C-S contract is defined by the set of request that a client can make of a server (in terms of public methods in Java) client client server request contract

  7. Inside the Walls • Services defined in the contract is solely up to the server object • Structural elements – data members • Behavioral elements – methods • Java classes are good in implementing such abstractions IceMaker +chill() +crush() +cube() +isEmpty() +addWater()

  8. Abstract Data Type • An ADT is an abstraction of a data type, with • a collection of data, and • a set of operations on that data • Typical operations an ADT needs to support • Add data to a data collection • Remove data from a data collection • Inquiries about the data in the collection

  9. What Is Not an ADT? • An ADT is not a data processor • It’s not supposed to manipulated data • So an abstraction such as the ice maker is not a good example • It takes in water, and outputs something different

  10. Various ADTs • Linear ADTs • Lists • Queues • Stacks • Trees • Binary trees • Maps • Dictionaries • Sets

  11. The ADT List • Operations supported • Create • Check if empty • Determine size • Add items • Remove items • Retrieve items (at a given position)

  12. A Sample Java Implementation • java.util.Vector