Presentation on theme: "Introduction to Object Orientation System Analysis and Design"— Presentation transcript:
1Introduction to Object Orientation System Analysis and Design
2ObjectivesUnderstand the basic characteristics of object-oriented systems.Understand the object orientation notationUnderstand how to analyze and design with OO paradigm
3What’s Object Orientation? A new technology based on objects and classesA paradigm (way of thingking) to organize software as a collection of discrete objects that incorporate both data and process.An abstraction of the real world based on objects and their interactions with other objects.
4Basic Characteristic (1) Classes and Objects OO focus on capturing structure and behaviour in little modules that encompass both data and process. These modules are known as OBJECTs.Class is a general template we use to define and create specific instances or objects.An object is an instantiation of a class.Each object has attributes (describe the object) and behaviors (what an object can do).
5<<instanceOf>> Class CarAttributesModelLocation#Wheels = 4OperationsStartAccelerate<<instanceOf>>
6Basic Characteristic (2) (2) Methods and MessagesMethods implement an object’s behaviourIn other languages, method is known as procedure or function.A message is a function or procedure call from one object to another object.
8Basic Characteristic (4) (3) Encapsulation and Information HidingEncapsulation : how to wrap process and data into a single entity.Only the information required to use a software module is published to the user. Exactly how the module implements the required information is unnecessary.
9Basic Characteristic (5) (4) InheritanceIs a mechanism to create a class from other class.Related terms : superclass and subclassSubclass inherit the appropriate attributes and methods from its superclass.Avoid repeating of writing attributes or methods.The relationship between the class and its superclass is known as the A-Kind-Of relationship.
11(5) Polymorphism and Dynamic Binding Polymorphism : the same message can be interpreted differently by different classes of objects.For example : sent message “draw” to an circle object, a square object, and a triangle object will make a different result.Dynamic Binding : determining the exact implementation of a request based on both the request (operation) name and the receiving object at run-time
22Analysis and Design Process Problem statementSystem architectureObject modellingIdentifying object classesPreparing a data dictionary for classesIdentifying associationIdentifying attributesRefining with inheritanceGrouping classes into modelDynamic modellingFunctional modelling
30ExampleAccount : a single account in a bank against which transactions can be applied. Account may be of various types, at least checking or savings. A customer can hold more than one account.Bank : A financial institution that holds accounts for customers and that issues cash cards authorizing access to accounts over the ATM network.ATM : …Bank Computer : ….Customer : …etc
35Refining with Inheritance This step is to organize classes by using inheritance to share common structureInheritance can be added in two directions :Bottom Up ： By generalizing common aspect of existing classes into a superclassesBy searching for classes with similar attributes, associations, or operationsFor each generalization, define a superclass to share common featuresTop Down ： By refining existing classes into specialized subclasses
37Grouping Class into Modules A module is a set of classes that captures some logical subset of entire modelFor example: a model of computer operating system might contain modules for process control, device control, file maintenance, and memory management
40Dynamic ModelThe dynamic model shows the time-dependent behavior of the system and the objects in it.Begin dynamic analysis by looking for event, externally visible stimuli and responses.The dynamic model is important for interactive systems, but insignificant for purely static data repository, such as database.
41The following steps are performed in constructing a dynamic model : Prepare scenarios of typical interaction sequencesIdentify events between objectsPrepare an event trace for each scenarioBuild a state diagramMatch events between objects to verify consistency
44Functional ModelThe functional model shows how values are computed, without regard for sequencing, decisions, or object structureThe functional model shows which values depend on which other values and the functions that relate themData flow diagrams are useful for showing functional dependencies