Скачать презентацию Basic Concepts of Object Orientation Object-Oriented Analysis CIM Скачать презентацию Basic Concepts of Object Orientation Object-Oriented Analysis CIM

60fb4df0d48eca79547a239d0e93475f.ppt

  • Количество слайдов: 15

Basic Concepts of Object Orientation Object-Oriented Analysis CIM 2566 Bavy LI Prepared by: Bavy Basic Concepts of Object Orientation Object-Oriented Analysis CIM 2566 Bavy LI Prepared by: Bavy LI Basic Concepts of OO

What is Object-Orientation? n Object-orientation is the use of objects and classes in analysis, What is Object-Orientation? n Object-orientation is the use of objects and classes in analysis, design, and programming. n The use of objects distinguishes objectorientation from other techniques such as traditional structured methods (process-based: data and function are separate) ¨ knowledge based systems (logic programming: Prolog) ¨ mathematical methods (functional programming: Scheme). ¨ Prepared by: Bavy LI Basic Concepts of OO 2

Why did OO Arise? n Modeling in analysis and software design and languages for Why did OO Arise? n Modeling in analysis and software design and languages for programming originally focused on process. But many results indicated the process approach was problematic and led to the software crisis. ¨ Hierarchical Functional Decomposition ¨ Top-Down Design (TDD) ¨ What Prepared by: Bavy LI are the advantages/disadvantages of TDD? Basic Concepts of OO 3

Why does “Organization” need Object-Orientation? n Organizationally, OO provides a superior means of: ¨ Why does “Organization” need Object-Orientation? n Organizationally, OO provides a superior means of: ¨ Problem/Business Analysis and Requirements ¨ Better Software Development/Modern programming practice ¨ Superior Software Engineering Metrics ¨ Web Presence and Utilization ¨ Software Reuse ¨ Software Use ¨ Enterprise Engineering Prepared by: Bavy LI Basic Concepts of OO 4

Terminology – 1 n OOA – Object Oriented Analysis ¨ analyzing objects n OOD Terminology – 1 n OOA – Object Oriented Analysis ¨ analyzing objects n OOD – Object Oriented Design ¨ designing n your problem by decomposition into your code into objects OOP – Object Oriented Programming ¨ programming orientation Prepared by: Bavy LI using the concepts of object Basic Concepts of OO 5

Terminology – 2 n Class ¨a design (like a blueprint for a house) of Terminology – 2 n Class ¨a design (like a blueprint for a house) of an object that contains data and methods n Object ¨ an instance (like a particular house with a street address) of a class with a unique identity n Abstraction ¨ only exposing the important, relevant qualities of an object or system Prepared by: Bavy LI Basic Concepts of OO 6

Terminology – 3 n Attribute ¨a named property of an object capable of holding Terminology – 3 n Attribute ¨a named property of an object capable of holding state, as similar as instance variables or data members n Method ¨ an operation on an object, also called a function or operation Prepared by: Bavy LI Basic Concepts of OO 7

What are the Primary Object. Oriented Languages Today? n C++ added classes to C What are the Primary Object. Oriented Languages Today? n C++ added classes to C as early as 1985 ¨A hybrid object-oriented languages with powerful features including multiple inheritance, exceptions, templates, operator overloading …etc n n Java was created as a simplification of C++ that could run on any machine, providing a writeonce/run anywhere capability. EJB 2. 0 is the new standard for the J 2 EE, or Java 2 Platform, Enterprise Edition Prepared by: Bavy LI Basic Concepts of OO 8

What are the Primary Object. Oriented Methodologies Today? n The Unified Modeling Language, or What are the Primary Object. Oriented Methodologies Today? n The Unified Modeling Language, or UML, has become the industry standard design and analysis notation, which lends itself to a methodology. Prepared by: Bavy LI Basic Concepts of OO 9

What are the Benefits Of Object. Orientation? n Reuse, quality, an emphasis on modeling What are the Benefits Of Object. Orientation? n Reuse, quality, an emphasis on modeling the real world, a consistent OOA/OOD/OOP package, naturalness (our "object concept"), resistance to change, encapsulation and abstraction, and etc. n On resistance to change, system objects change infrequently while processes and procedures (top-down) are frequently changed. Prepared by: Bavy LI Basic Concepts of OO 10

Big Three (and a half) n The three and a half key ingredients of Big Three (and a half) n The three and a half key ingredients of OOP are ¨ Encapsulation, ¨ Inheritance, ¨ Polymorphism, and ¨ Message Passing Prepared by: Bavy LI Basic Concepts of OO 11

Encapsulation n hides implementation, shows only interface ¨ Encapsulation n hides implementation, shows only interface ¨ "Encapsulation is the process of hiding all of the details of an object that do not contribute to its essential characteristics. " – Booch Prepared by: Bavy LI Basic Concepts of OO 12

Inheritance n IS A relationship ¨A new class can be created by Inheritance n IS A relationship ¨A new class can be created by "Inheriting" from another class or multiple classes. ¨ The new class inherits methods and data members of the "parent" class. ¨ This is also called "extending" the base class, or "sub-classing". Prepared by: Bavy LI Basic Concepts of OO 13

Message Passing n a message is an invocation of a method on an object Message Passing n a message is an invocation of a method on an object ¨ "an object-oriented program is a bunch of objects laying around sending messages to one another. " Prepared by: Bavy LI Basic Concepts of OO 14

Polymorphism n the ability to hide many different implementations behind a single interface. When Polymorphism n the ability to hide many different implementations behind a single interface. When objects respond differently to the same message this is a form of Polymorphism. Prepared by: Bavy LI Basic Concepts of OO 15