Information Technology Reference
In-Depth Information
Interfaces are extremely useful tools that are vital to many object-oriented
concepts, including information hiding, efficient reuse, abstraction, encapsulation
and the proper use of inheritance.
2.6 Chapter Conclusion and Summary
This chapter focused on the object-oriented paradigm and its relationship to
software engineering. We defined, first, the base components of object-oriented
theory: objects and classes. Classes, as we have said, are not tangible entities, but
rather they are blueprints for creating such entities. Objects, on the other hand, are
created by classes, which represent the structure of a software system, and are
made up of attributes, methods and some unique identifier.
Object-oriented theory is strongly rooted in the concept of modularity. A modular
software system is comprised of independent components which are properly
implemented in order to function together. The concept of modularity enhances the
creation of reusable software components through the proper use of encapsulation
and information hiding. Encapsulation allows us to separate an object's inner
workings from its outward appearance, and thus lend the object internal integrity.
The creation of a modular software system relies on the use of abstraction to
create a general view of the system's components. Through abstraction, a series of
generalized components can both provide the boundary to be used in encapsulation
and establish a logical class hierarchy for the specification of individual compo-
nents and classes.
2.7 Exercises
1. Using examples, explain the difference between a class and an object.
2. Explain how the concepts of the object-oriented paradigm are used to reduce
the complexity of a software system.
3. We have said that an object consists of attributes and methods. What are these?
Describe one attribute and one method of a pencil?
4. Explain how inheritance might jeopardize encapsulation. Can you think of a
solution for this?
5. Describe an inheritance hierarchy connecting a button down shit to its root
class, clothing.
Search WWH ::




Custom Search