Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOFTWARE DESIGN AND ARCHITECTURE

Similar presentations


Presentation on theme: "SOFTWARE DESIGN AND ARCHITECTURE"— Presentation transcript:

1 SOFTWARE DESIGN AND ARCHITECTURE
LECTURE#2

2 DESIGN PRICIPLES ABSTRACTION ENCAPSULATION DECOMPOSITION
GENERALIZATION

3 ABSTRACTION Abstraction breaks a concept down into a simplified description that ignores unimportant details and emphasizes the essentials needed for the concept, within some context. Rule of astonishment Choose abstraction that is more appropriate to the context If situation changes, Reconsider your abstractions.

4 Encapsulation The ability to “bundle” attribute values (or data) and behaviours (or functions) that manipulate those values, into a self-contained object. The ability to “expose” certain data and functions of that object, which can be accessed from other objects, usually through an interface The ability to “restrict” access to certain data and functions to only within the object.

5 Data and functions that manipulate that data are “bundled” into a self-contained object.
Data and functions of the object can be exposed or made accessible from other objects. Data and functions of the object can be restricted to only within the object

6 Decomposition It consists of taking a whole thing, and dividing it into different parts. The general rule for decomposition is to look at the different responsibilities of a whole and evaluate how the whole can be separated into parts that each have a specific responsibility “Lifetimes” of whole and part classes should be well defined.

7 Decomposition Three types of relationship in decomposition Association
Aggregation Composition

8 Generalization Generalization helps reduce redundancy when solving problems. In coding, algorithmic behaviors are often modelled through methods object-oriented modelling achieves generalization by classes through inheritance

9 Design Principles(cont’d)
Evaluating Design Complexity Design complexity applies t both classes and methods Metrics for complexity is Coupling Cohesion


Download ppt "SOFTWARE DESIGN AND ARCHITECTURE"

Similar presentations


Ads by Google