170 likes | 302 Views
Object Oriented Concepts. 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.
E N D
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.
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.
The major difference between an Object and an Entity (from ERD) Entity Object * Attribute (identifier) Attribute Attribute Attribute Method Method Methods!
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”.
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
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.
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”
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 UML
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.
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.