Object-Oriented Concepts and UML Diagrams Explained

Object-Oriented Concepts

Object: An object is anything that we can recognize with an identity, a state, and behavior.

Class: It is an abstraction representing a set of objects with similar behavioral characteristics.

Use Cases

Use Case: A sequence of interactions (user-software product) to meet requirements.

Actor: Anyone who needs to meet their requirements. There may be 3 types:

  • Main: The one who initiates the use case and needs to fulfill its requirements.
  • Partner: An actor interacting with the principal actor’s needs.
  • Secondary: An actor who provides services to the system to satisfy the main actor’s requirement.

Associations Between Use Cases

  • Inclusion: When one use case is included in another, making its implementation mandatory.
  • Extension: When the execution of a use case deviates from the main flow, making the execution optional.

Use cases are derived from functional requirements.

UML Diagrams

Key UML Diagrams include:

  • Deployment
  • Interaction (Sequence, Collaboration)
  • Business Use Case
  • Use Case
  • Activity
  • Class
  • Component

Deployment Diagram

Concept: Represents the physical layout of the hardware and software components of a system. It shows where software components are deployed on hardware, including computers, servers, and other devices, illustrating their physical relationships and how they support system functionality.

Why RUP Methodology Focuses on Object-Oriented Use Cases

RUP focuses on object-oriented use cases because the use cases and scenarios identified during the process are effective for capturing design requirements and providing guidelines for implementation and testing.

Interaction Diagrams

Show the sequence and collaboration of objects to fulfill requirements.

Sequence Diagram

Illustrates the sequence of interactions between objects over time, based on messages exchanged.

Message: The basic unit of interaction between system elements.

Collaboration Diagram

Shows how different elements work together to fulfill a system requirement.

Rules for Collaboration Diagrams

  • For each use case, construct a Sequence diagram and a Collaboration diagram.
  • Messages exchanged between objects correspond to method calls or interactions defined by the operations of their classes.
  • Classes are identified based on the objects participating in the Sequence diagram.

Activity Diagram

Describes the flow of activities or actions. It can represent high-level processes resulting from actor-system interaction or low-level processes showing object collaboration to satisfy requirements.

State Transition Diagrams

Illustrate the different states an object of a class can have and the events that cause transitions between these states.

  • Event: An occurrence that triggers a state change.
  • Guard Condition: A condition that must be true for a state transition triggered by an event to occur.

State Transition diagrams apply to objects of classes.

Database Concepts

  • Tablespace: A storage unit within a database where database objects like tables are stored.
  • Database: A structured collection of related data.
  • Owner: A database user or role that owns database objects like tables, controlling access and permissions.
  • Stored Procedure: A precompiled set of SQL statements stored in the database, which can be executed as a single unit.

Class Attributes and Operations

In object-oriented programming, attributes and operations typically have three access modifiers: private, public, and protected.

By default, attributes are often private and operations public, though this can vary by language.

System Layout

Layout (System): A high-level view of the physical environment or infrastructure where the system will be implemented.