1.36k likes | 1.36k Views
WARNING. These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions . You can download PowerPoint 2010 viewer from here .
E N D
WARNING • These slides are not optimized for printing or exam preparation. These are for lecture delivery only. • These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. • These slides contain a lot of animations. For optimal results, watch in slideshow mode.
foo() bar() Main
foo() bar() Main
………………………….. How to structure? ……………………… ……………. ……………….. ………………………. 1 2 3 4 ……………. 1. ………………… 2. ……………….. 3. ………….. 4. ……………..
How to structure? 1 2 3 4
??? inti i=5 ???? MOV AL, 1h MOV CL, 2h MOV DL, 3h ???? 110010101001101110101010101010101010
High-Level Languages inti i=5 ASSEMBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010
High-Level Languages inti i=5 ASSEMBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010 Programming Paradigms [Styles of structuring a solution]
PROCEDURAL function1 function 2 --------------- array list High-Level Languages inti i=5 ASSEBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010
OBJECT-ORIENTED PROCEDURAL function1 function 2 --------------- array list High-Level Languages inti i=5 ASSEBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010 OBJECT-ORIENTED Other paradigms
How to structure? Follow a paradigm Object Oriented Programming 1 2 3 4 OOP
Designing component internals using Object-Oriented Programming
OBJECT-ORIENTED PROCEDURAL function1 function 2 --------------- array list High-Level Languages inti i=5 ASSEBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010 OBJECT-ORIENTED Other paradigms
OBJECT-ORIENTED PROCEDURAL function1 function 2 --------------- array list High-Level Languages inti i=5 ASSEBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010 OBJECT-ORIENTED Other paradigms
Let’s follow real world OBJECT-ORIENTED
Let’s follow real world World = a network of objects collaborating by way of message + response OBJECT-ORIENTED
Let’s follow real world intuitive OBJECT-ORIENTED efficient? OBJECT-ORIENTED • Structure solution as collaborating objects. Object[ Data + related functions]
OBJECT-ORIENTED • Structure solution as collaborating objects. Object[ Data + related functions]
How to structure? Collaborating objects Follow a paradigm 1 2 3 4 OOP
1 2 3 4
1 2 3 4
Structure solution as collaborating objects. OBJECT-ORIENTED Object[ Data + related functions]
Structure solution as collaborating objects. OBJECT-ORIENTED Object[ Data + related functions]
OBJECT-ORIENTED Object[ Data + related functions] Object[ Data + related functions] Object[ Data + related functions]
OBJECT-ORIENTED Object[ Data + related functions] Object[ Data + related functions] Object[ Data + related functions]
Less details More details X function function Object Data Object[ Data + related functions] Data function Data Data function Data function Data Data Object function Data function Data Data
is an An object of closely-related behavior and data X function function Object Data Object[ Data + related functions] Data function Data Data function Data function Data Data Object function Data function Abstraction Data Data
is an An object of closely-related behavior and data X function function Object Data Object[ Data + related functions] Data function Data Data function Data function Data Data Object function Data function Abstraction Data Data
is an An object of closely-related behavior and data X function function Object Data Object[ Data + related functions] Data function Data Data function Data function Data Data Object function Data function Abstraction Data Data