Professional Documents
Culture Documents
04 Design Principles
04 Design Principles
04 Design Principles
DCIT 26
SOFTWARE DESIGN
In
software design, we consider the system to be a set of
components or modules with clearly defined behaviors &
boundaries.
OBJECTIVES OF SOFTWARE DESIGN
Effectively
dealing with the complexity will now no longer lessen
the attempt needed for design but also can lessen the scope of
introducing mistakes for the duration of design.
FOLLOWING ARE THE PRINCIPLES OF SOFTWARE
DESIGN
Problem Partitioning
divide
the problems into small pieces and conquer the problems
one by one.
Functional Independence
Functionalindependence is achieved by developing functions
that perform only one kind of task and do not excessively interact
with other modules
This
principle says that a class should have one, and only one,
reason to change. SRP is about designing your classes so that
each does just one thing, and does it very well.
The
Open-Closed Principle (OCP) says that classes should be
open for extension and closed for modification.
This
principle says that inheritance should be well designed and
well behaved.
Imagine managing two types of coffee machine.
In
that case, means that in our implementations we will have
methods that don’t need.
The
main issue, is that the Car and Airplane have methods that
don’t use.
DEPENDENCY INVERSION PRINCIPLE (DIP)
Itstates that the high-level module must not depend on the low
level module, but they should depend on abstractions.