













































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth exploration of object-oriented design (oo design), focusing on the concepts of classes, encapsulation, inheritance, and the use of metrics for evaluating oo designs. The purpose of oo design, object-oriented analysis and design (oo a&d), oo concepts, and the use of the unified modeling language (uml) for modeling oo systems.
Typology: Study notes
1 / 53
This page cannot be seen from the preview
Don't miss anything!














































Traditional procedural systems separate data and procedures, and model these separately Object orientation combines data and methods together into a cohesive whole data abstraction The purpose of Object-Oriented (OO) design is to define the classes (and their relationships) that are needed to build a system that meets the requirements contained in the SRS
grouping of related ideas into one unit which we can refer to by a single name For example, methods, classes, packages
An object’s data is hidden behind the public interface (methods) of the object
An interface which defines which parts of an object can be accessed from outside A body that implements the operations Instance variables to hold object state
State and identity is associated with objects
Public: accessible from outside Private: accessible only from within the class Protected: accessible from within the class and from within subclasses
B’s specification only defines the new attributes
objects of type B are also objects of type A
There are several types of inheritance Strict inheritance: a subclass uses all of the features of its parent class without modification The subclass only adds new attributes or methods Non-strict inheritance: a subclass may redefine features of the superclass or ignore features of the superclass Strict inheritance supports “is-a” cleanly and has fewer side effects If a subclass redefines a method of the parent, it can potentially break the contract that the superclass offers its users
An object of type B is also an object of type A
Implications on type checking Also brings dynamic binding of operations which allows writing of general code where operations do different things depending on the type
Basic modules are classes During OO design, a key activity is to specify the classes in the system being built In creating our design, we want it to be “correct” (i.e. cover its requirements) But a design should also be “good” – efficient, modifiable, stable, … We can evaluate an OO design using three concepts coupling, cohesion, and open-closed principle
this can’t be avoided, obviously… but we want to ensure that an object’s public interface is used a method of class A should NOT directly manipulate the attributes of another class B Why?
A has instance variables of type C A has a method with a parameter of type C A has a method with a local variable of type C
Component coupling will generally imply the presence of interaction coupling also