Download presentation
Presentation is loading. Please wait.
Published byProsper Dean Modified over 9 years ago
1
Object Oriented Modeling David Li CTO, DigitalSesame
2
Object Modeling is Fun Elegant Easy to understand Powerful Comprehensive
3
Creating Beautiful Systems Introduce the concept of object orientation Introduce a design notation Introduce an analysis and design method Discuss implementation issues
4
What you should take away A set of tools to help you solve problem A knowledge of what object orientation is about A way of solving problems An understanding of how to implement solutions in object oriented language
5
Course Structure Module 1 – Object Oriented Concepts Module 2 – Object Modeling Module 3 – Dynamic Modeling Module 4 – Activity Modeling Module 5 – Functional Modeling Module 6 – Object Modeling Technique Module 7 – Design and Implementation
6
Module 1 – Contents Why object-orientation? What an object is Representing objects Classes and instances Inheritance Encapsulation Polymorphism Aggregation
7
The Faith Objects are a nature way of representing the real world in a computer system Objects are easy to understand Objects will revolutionize computer systems development Computer programs will become easy to understand and maintainable
8
The Hope Costs will come down Timescales will not slip Maintenance will become easier System will meet expectations
9
The Reality Object concepts underpin most modern software products Objects are simply a refinement of long established concepts The basic concept began as early as 1967 (Simula 67) The current idea matured in the early 1980’s (Smalltalk 80)
10
Re-inventing the Wheel? Object methods use traditional software analysis and design approach but –They integrate approaches much better –They fit with computer languages much better –They are supported by software tools which can generate the code for framework of the application
11
The Object Model Is the CenterObjectModel DynamicModelFunctionalModel ActivityModel
12
Object Model Sits at the center Final repository of everything Starting point of the implementation
13
What is an object? An object is anything in the real world –Can be tangible: chair, car, and person –Can be a process: workflow or schedule –Can be a relationship: contract –Can be theoretical: matrix Any Noun can a an object Objects are simplified view of real world artifacts
14
Representing Object Object have names Objects have attributes which define their states Objects have operations which defines what can be done with them
15
Picture of ObjectsPerson-------------------AgeName-------------------Admit()Examine() Name Attribute Operation
16
Attributes Data in the system Manipulated by operations Attributes of an objects are the only data which operations can access directly Attributes can be other objects (HAS)
17
Operations Also called “Methods” or “Messages” Where the process is done Manipulate attributes with in a object Can called operations in related objects Send and receive information as parameter
18
Classes and Instances A collection of similar objects is called a “Class” All objects in a class have the same –Attributes –Operations Attributes of different objects of the same class may be different A object of a class is called an “instance” of the class
19
Classes and Instances (Example) A set of all teachers is a class All teachers have a name, age, and gender All teacher can talk and teach Different teachers have different name, age and gender
20
Inheritance Classes can be arranged in inheritance hierarchies A class inherits operations and attributes from its parent (super class) This is one of the underlying mechanisms for providing for code reuse
21
Inheritance (Example)Person StudentTeacher College High School
22
Multiple InheritancePresident Admin.Teacher A class can inherit from multiple super classes
23
Encapsulation Only way to change object is through its operations Attributes and operations are encapsulated in one definition Easy control changes to data Change internal of an object with changing its behavior
24
Advantage of Encapsulation Access to data is controlled –No illegal or accident change to data can be made All operations on data are grouped together
25
Polymorphism Operation of the same name can be override Single operation can perform differently on different object
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.