Object Orientation. Object Concepts. Object Concepts. Real-world Objects. Two characteristics : state behavior
Object Orientation
Object Concepts
• Pemrograman sebagai suatu bentuk seni • Pendekatan secara object menghasilkan disain software yang lebih baik: ...
• Pemrograman sebagai suatu bentuk seni • Pendekatan secara object menghasilkan disain software yang lebih baik: modularity, reusability, maintainability • OOA/D mengikuti paradigma pengembangan perangkat keras
Packaging an object’s variables within the protective custody of its methods. Typically, used to hide unimportant implementation details from other objects. Benefits:
Software object saling berinteraksi dan berkomunikasi dengan saling mengirimkan messages. Setiap object menyediakan interface yang dapat dipakai untuk berinteraksi dengan object lain. Object A menginginkan object B untuk menampilkan suatu perilaku, maka object A mengirim message ke object B.
2. Perilaku yang dikehendaki untuk ditampilkan (nama method dari object yang dituju) 3. Informasi yang diperlukan untuk menampilkan perilaku yang dimaksud. 12-Feb-04
does it mean to have a welldesigned object-oriented system? z How should responsibilities be allocated to classes of objects? z How should objects interact? z What classes should do what?
Inheritance defines a relationship among classes where one class shares the structure and/or behavior of one or more classes. “Is-a” or “kind-of” hierarchy. What will be inherited from superclass?
May be augmented with additional attributes and operations that apply only to that level of the hierarchy. May supply its own implementation of an operation.
The lifetime of the part is bound within the lifetime of the composite. There is an obvious whole-part physical or logical assembly. Some properties and operations of the composite propagate to the parts.