Upload
febriyana-sudrajat-nugraha
View
223
Download
0
Embed Size (px)
Citation preview
8/3/2019 #12. OO Principle 1
1/17
8/3/2019 #12. OO Principle 1
2/17
Problem solving process whose objectiveis to :
find and describe a way to implement thesystems functional requirements
while respecting the constraints imposed bythe quality, platform and process
requirements (including the budget anddeadlines), and
while adhering to general principles of goodquality.
8/3/2019 #12. OO Principle 1
3/17
Part of design space, showing alternative
designs resulting from different choiceswhen making decisions.
8/3/2019 #12. OO Principle 1
4/17
We design module !
8/3/2019 #12. OO Principle 1
5/17
In top-down design, you start with the very high-level structure ofthe system.
Examples of high-level issues that are approached first in top-down design include the software architecture and the kind ofdatabase that will be used.
After many higher-level decisions are made, you finally arrive atdetailed decisions such as the format of particular data items,and the individual algorithms that will be used.
bottom-up design, involves first making decisions about reusablelow-level utilities and then deciding how these will be puttogether to create high-level constructs.
Conclusion: Mix it up !!!
8/3/2019 #12. OO Principle 1
6/17
Dont conquer everything, instead of it, divide into smallerproblems and then we may conquer it (paralelly)
Example:
Cars are also built using the divide and conquer strategy:some people design the engines while others design thebody
Pada projek paperless office dengan fitur yang dimintaoleh user berupa SPPD & Disposisi Online serta ManajemenRapat, diidentifikasi tiga hal yang harus dibuat segerayaitu Flow dokumen/proses bisnis, struktur data/dokumendan prototyping. Sehingga dibutuhkan tiga tim kecil untukmenyelesaikan ketiga hal tersebut secara paralel/semiparalel.
8/3/2019 #12. OO Principle 1
7/17
7 2 9 4 2 4 7 97 2 2 7 9 4 4 9
7 7 2 2 9 9 4 4
8/3/2019 #12. OO Principle 1
8/17
divide and conquer to divide things
up into smaller chunks.
Cohesion says to do it intelligently yes,
divide things up, but keep things
together that belong together.
8/3/2019 #12. OO Principle 1
9/17
Utility : Related utilities are kept together, when there is no way to group them using a stronger form of
cohesion
Temporal : Procedures used in the same general phase of execution, such as initialization or termination, arekept together. Everything else is kept out
Procedural : A set of procedures, which are called one after another, is kept together. Everything else is keptout
Sequential : A set of procedures, which work in sequence to perform some computation, is kept together.Output from one is input to the next. Everything else is kept out
Communicational : Facilities for operating on the same data are kept together, and everything else is keptout. Good classes exhibit communicational cohesion
Layer : Related services are kept together, everything else is kept out, and there is a strict hierarchy in whichhigher-level services can access only lower-level services. Accessing a service may result in side effects
Functional : Facilities are kept together that perform only one computation with no side effects. Everythingelse is kept out
8/3/2019 #12. OO Principle 1
10/17
Silakan dicari sendiri ...
8/3/2019 #12. OO Principle 1
11/17
No dependencies Loosely coupled-some dependencies
Highly coupled-many dependencies
8/3/2019 #12. OO Principle 1
12/17
High Coupling
Loose
Low
Content
Common
Control
Stamp
Data
Routine Call
Type use
Inclusion / import
External
8/3/2019 #12. OO Principle 1
13/17
Silakan dicari sendiri
8/3/2019 #12. OO Principle 1
14/17
Abstractions are needed because thehuman brain can process only a limitedamount of information at any one time
Abstraksi level tinggi: class dari domainpermasalahan (sudah pernah dibahas
).
Contoh abstraksi yang lebih rendah :method abstraction, data abstraction
8/3/2019 #12. OO Principle 1
15/17
Design forreuse, and the second is todesign with reuse (complementary)
Important strategies for increasingreusalbility:
Generalize your design as much as possible.Contoh : method for drawing 2D shapes.
Follow the preceding three design principles.
Design your system to contain hooks.
Simplify your design as much as possible.
8/3/2019 #12. OO Principle 1
16/17
Basic Unix commands such as grep, cat,head, tail, sort, uniq, awk, and sed
Their simplicity comes from the fact thatthey all input and output the same datatype: streams of characters.
Their power comes from the fact that theycan be strung together in a large variety ofcombinations.
8/3/2019 #12. OO Principle 1
17/17
Thank you