1 / 136

WARNING

Explore high-level languages and paradigms like object-oriented programming to design efficient solutions. Learn how to structure code using collaborating objects.

joant
Download Presentation

WARNING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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.

  2. foo() bar() Main

  3. foo() bar() Main

  4. Data, functions

  5. How to structure?

  6. ………………………….. How to structure? ……………………… ……………. ……………….. ………………………. 1 2 3 4 ……………. 1. ………………… 2. ……………….. 3. ………….. 4. ……………..

  7. How to structure? 1 2 3 4

  8. ??? inti i=5 ???? MOV AL, 1h MOV CL, 2h MOV DL, 3h ???? 110010101001101110101010101010101010

  9. High-Level Languages inti i=5 ASSEMBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010

  10. 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]

  11. PROCEDURAL function1 function 2 --------------- array list High-Level Languages inti i=5 ASSEBLY MOV AL, 1h MOV CL, 2h MOV DL, 3h BINARY 110010101001101110101010101010101010

  12. 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

  13. How to structure? Follow a paradigm Object Oriented Programming 1 2 3 4 OOP

  14. Designing component internals using Object-Oriented Programming

  15. 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

  16. 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

  17. Let’s follow real world OBJECT-ORIENTED

  18. Let’s follow real world World = a network of objects collaborating by way of message + response OBJECT-ORIENTED

  19. Let’s follow real world  intuitive OBJECT-ORIENTED  efficient? OBJECT-ORIENTED • Structure solution as collaborating objects. Object[ Data + related functions]

  20. OBJECT-ORIENTED • Structure solution as collaborating objects. Object[ Data + related functions]

  21. How to structure? Collaborating objects Follow a paradigm 1 2 3 4 OOP

  22. 1 2 3 4

  23. 1 2 3 4

  24. Structure solution as collaborating objects. OBJECT-ORIENTED Object[ Data + related functions]

  25. Structure solution as collaborating objects. OBJECT-ORIENTED Object[ Data + related functions]

  26. OBJECT-ORIENTED Object[ Data + related functions] Object[ Data + related functions] Object[ Data + related functions]

  27. OBJECT-ORIENTED Object[ Data + related functions] Object[ Data + related functions] Object[ Data + related functions]

  28. Object[ Data + related functions]

  29. 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

  30. 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

  31. 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

  32. 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

More Related