System Analysis and Design - Basic Characteristic of Object-Oriented Analysis
-
Upload
dudy-ali -
Category
Technology
-
view
27 -
download
0
Transcript of System Analysis and Design - Basic Characteristic of Object-Oriented Analysis
TIPS – SAD Dudy Fathan Ali S.Kom
Basic Characteristic of Object-Oriented Analysis
TIPS
Dudy Fathan Ali, S.Kom (DFA)2015
CEP - CCITFakultas Teknik Universitas Indonesia
Tujuan Pembelajaran
TIPS – SAD Dudy Fathan Ali S.Kom
Peserta didik mengenal karakteristik dasar dari sistem berorientasi obyek.
Karakteristik Dasar Sistem Berorientasi Obyek
TIPS – SAD Dudy Fathan Ali S.Kom
Object-oriented systems focus on capturing the structure and behavior of information systems in little modules that encompass both data and processes. These little modules are known as objects. - System Analysis & Design (Dennis, Wixom, Roth)
Karakteristik dasar dari Sistem Berorientasi Obyek :Class and Object
Method and Message
Encapsulation and Information Hiding
Inheritance
Polymorphism and Dynamic Binding
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
ClassA class is the general template we use to define and create specific instances, or objects.
ObjectAn object is an instantiation of a class. In other words, an object is a person, place, event, or thing about which we want to capture information
Every object is associated with a class.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
Each object has attributes that describe information about the object, such as acustomer’s name, address, e-mail, and phone number.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Customer{ public string name; public string address; public string phone;
public void insert(string name, string address, string phone) { // do something here! } }
Atribut digunakan untuk mendeskripsikan informasi dari suatu object.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Customer{ public string name; public string address; public string phone;
public void insert() { // do something here! } }
Method digunakan untuk mendeskripsikan aksi yang bisa dilakukan oleh suatu object.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Program{ public static void Main(String[] args) { Customer aCustomer = new Customer();
aCustomer.name = “DFA”; aCustomer.address = “Jakarta”; aCustomer.phone = “0218734575”;
aCustomer.insert(); }}
Membuat Object dari kelas Customer dengan nama aCustomer.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Program{ public static void Main(String[] args) { Customer aCustomer = new Customer();
aCustomer.name = “DFA”; aCustomer.address = “Jakarta”; aCustomer.phone = “0218734575”;
aCustomer.insert(); }}
Memasukkan informasi kepada object aCustomer.
Method and Messages
TIPS – SAD Dudy Fathan Ali S.Kom
Methods implement an object’s behavior. A method is nothing more than an action that an object can perform. Methods are very much like a function or procedure in a traditional programming language such as C, COBOL, or Pascal.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Customer{ public string name; public string address; public string phone;
public void insert() { // do something here! } }
Behaviour yang dimiliki oleh suatu class.
Class and Object
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Program{ public static void Main(String[] args) { Customer aCustomer = new Customer();
aCustomer.name = “DFA”; aCustomer.address = “Jakarta”; aCustomer.phone = “0218734575”;
aCustomer.insert(); }}
Instruksi yang dikirimkan ke object untuk menjalankan suatu function.
Encapsulation and Information Hiding
TIPS – SAD Dudy Fathan Ali S.Kom
Encapsulation is simply the combining of process and data into a single entity. Object-Oriented approaches combine process and data into an Object.
The principle of information hiding suggests that only the information required to use a software module be published to the user of the module.
Inheritance
TIPS – SAD Dudy Fathan Ali S.Kom
inheritance is when an object or class is based on another object or class, using the same implementation (inheriting from a class) specifying implementation to maintain the same behavior.
Inheritance
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class Person{ protected string lastname; protected string firstname; protected string address; protected string homephone;
public void updateaddress() { //do something here }}
Class Employee : Person{ private string hiredate; private string paygrade;
public void updatepaygrade() { lastname = “Baswedan”; firstname = “Anies”; address = “Jakarta”; homephone = “0219384833”; hiredate = “2015-01-01”; paygrade = “8,000,000”; //code for update here }}
Menunjukan bahwa Class Person mewarisi struktur data dan behaviour kepada Class Employee
Polymorphism and Dynamic Binding
TIPS – SAD Dudy Fathan Ali S.Kom
Polymorphism means that the same message can be interpreted differently by different classes of objects.
In programming languages and type theory, polymorphism (from Greek πολύς, polys, "many, much" and μορφή, morphē, "form, shape") is the provision of a single interface to entities of different types.
Polymorphism is made possible through dynamic binding. Dynamic, or late, binding is a technique that delays identifying the type of object until run-time.
Polymorphism and Dynamic Binding
TIPS – SAD Dudy Fathan Ali S.Kom
In a programmer’s perspective :Class HitungAngka{ public void proseshitung(int a, int b) { //code here }
public void proseshitung(int a, int b, int c) { //code here } }
Hal ini tidak akan membuat error, karena OOP telah mendukung fitur Polymorphism.
TIPS – SAD Dudy Fathan Ali S.Kom
Terima KasihDudy Fathan Ali S.Kom