5 Data Abstraction
This chapter discusses the most important abstraction mechanism, data abstraction. Data abstraction allows us to abstract from the details of how data objects are implemented to how the objects behave. This focus on the behavior of objects forms the basis of object-oriented programming.
Data abstraction allows us to extend the programming language in use (e.g., Java), with new data types. What new types are needed depends on the application domain of the program. For example, in implementing a compiler or interpreter, stacks and symbol tables are useful, while accounts are a natural abstraction in a banking system. Polynomials arise in a symbolic manipulation system, and matrices are useful in defining a package of numeric ...
Get Program Development in Java: Abstraction, Specification, and Object-Oriented Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.