Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented...

16
Object Oriented Concepts
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    231
  • download

    1

Transcript of Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented...

Page 1: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Object Oriented Concepts

Page 2: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Movement toward Objects Instead of data-oriented or process-oriented

Analysis, many firms are now moving to object-oriented analysis.

In 1997, Unified Modeling language (UML) was accepted as the standard.

You need to understand what these concepts are… after that, it is very similar to the methods we’ve practiced.

Page 3: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Object Concepts An object is a person, place, event, or thing about which we want to capture

information. Each object has properties (or attributes). The state of an object is defined by the value of its properties and relations

with other objects at a point in time. Objects have behaviors -- things that they can do -- which are described by

methods (or operations). Code!!! Objects do not use primary or foreign keys, instead each instance is assigned

a unique identifier (UID) when it is created.

Page 4: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

The major difference between an Object and an Entity (from ERD)

Entity

* Attribute (identifier)Attribute

Object

AttributeAttribute

MethodMethod

Methods!

Page 5: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

An Object and Object Instances

Page 6: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Class A class is a general template we use to

define and create specific instances or objects.

Move from general to specific down a “family tree”.

Page 7: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Class Hierarchy

Page 8: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Inheritance Classes are arranged in a hierarchy

Superclasses or general classes are at the top Subclasses or specific classes are at the bottom

Subclasses inherit attributes and methods from the superclasses above them

Classes with instances are concrete classes Abstract classes only produce templates for more

specific classes

Page 9: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Inheritance

Page 10: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Messages & “Polymorphism” Messages are information sent to objects to

trigger methods. “Polymorphism” – “Many shapes”

when the same message can be interpreted differently by different classes of objects.

Page 11: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Polymorphism

Page 12: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Encapsulation Binding or hiding the data and methods

within an object The message is sent without considering

how it will be implemented The object can be treated as a “black-box”

Page 13: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

UML Defines a set of nine object diagramming

techniques The key building block is the use case Diagrams are tightly integrated syntactically

and conceptually to represent an integrated whole

Application of UML can vary among organizations

Page 14: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

4 Major UML Diagrams Use Case (very similar to what we’ve

done). In UML, these are kind of a hybrid between

our Use Cases and a Context Diagram. Sequence Diagram.

Shows interaction between classes for a particular Use Case.

Page 15: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

4 Major UML Diagrams Class Diagram.

Similar to ERD, only it shows classes instead of entities.

Statechart Diagram. Shows the state of an object at a given point.

Page 16: Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.

Integration of four UML Diagrams