unit 3 (OOSE)

 

1. Introduction to UML

UML (Unified Modeling Language) is a standard graphical language used to visualize, specify, construct, and document software systems.

Objectives of UML

  • Understand system requirements.
  • Visualize system design.
  • Improve communication among developers.
  • Document software architecture.
  • Reduce development complexity.

Advantages of UML

  • Easy to understand.
  • Platform independent.
  • Supports object-oriented development.
  • Improves software quality.
  • Helps in system maintenance.

2. UML Notations

UML uses different symbols to represent system elements.

NotationDescription
ClassRepresents a blueprint of objects
ObjectInstance of a class
ActorExternal user interacting with system
Use CaseFunction provided by system
AssociationRelationship between classes
PackageGroup of related classes
InterfaceDefines services provided by class

Example of Class Notation

------------------
| Student |
------------------
| RollNo |
| Name |
------------------
| Display() |
------------------

3. UML Relationships

Relationships show how elements are connected.

1. Association

A general connection between two classes.

Example: Student enrolls in Course.

2. Aggregation

"Weak Has-A" relationship.

Example: Department has Teachers.

If department is deleted, teachers can still exist.

3. Composition

"Strong Has-A" relationship.

Example: House contains Rooms.

If house is destroyed, rooms also disappear.

4. Inheritance (Generalization)

One class acquires properties of another class.

Example: Car inherits Vehicle.

5. Dependency

One class depends on another class temporarily.

Example: Customer depends on Payment Service.


4. Stereotypes

A stereotype extends UML elements by adding extra meaning.

Purpose

  • Customize UML models.
  • Provide additional information.
  • Improve readability.

Common Stereotypes

StereotypeMeaning
<<interface>>Interface definition
<<entity>>Data storing class
<<control>>Controls system behavior
<<boundary>>User interaction class

Example

<<interface>>
PaymentGateway

5. UML Based Tools

UML tools help create and manage UML diagrams.

A. Rational Rose

  • Developed by IBM.
  • Popular UML modeling tool.
  • Supports forward and reverse engineering.
  • Generates code automatically.

Features

  • Class diagrams
  • Use case diagrams
  • Sequence diagrams
  • Code generation

B. Poseidon

  • UML modeling tool based on Java.
  • Easy to use interface.
  • Supports UML standards.

Features

  • Diagram creation
  • Model validation
  • Documentation generation

Other UML Tools

  • StarUML
  • Visual Paradigm
  • Enterprise Architect
  • ArgoUML

6. Object-Oriented Analysis (OOA)

Object-Oriented Analysis is the process of identifying objects, classes, relationships, and requirements of a system.

Objectives

  • Understand user requirements.
  • Identify system objects.
  • Build analysis models.
  • Reduce design complexity.

7. Conventional vs Object-Oriented Analysis

Conventional AnalysisOO Analysis
Function-orientedObject-oriented
Focus on processesFocus on objects
Uses DFDsUses UML diagrams
Data and functions separateData and functions together
Difficult maintenanceEasy maintenance
Less reusableMore reusable

Example

Conventional Approach

  • Student Record Processing
  • Fee Processing
  • Report Generation

OO Approach

  • Student Class
  • Fee Class
  • Report Class

8. Requirement Analysis

Requirement Analysis is the process of collecting and analyzing user needs before system development.

Types of Requirements

Functional Requirements

Describe what the system should do.

Examples

  • User login
  • Course registration
  • Fee payment

Non-Functional Requirements

Describe system quality attributes.

Examples

  • Security
  • Reliability
  • Performance
  • Scalability

Steps in Requirement Analysis

  1. Requirement Gathering
  2. Requirement Analysis
  3. Requirement Specification
  4. Requirement Validation

Benefits

  • Reduces project risk.
  • Improves customer satisfaction.
  • Helps in accurate design.

9. Use Case Diagram

A Use Case Diagram shows interactions between users (actors) and the system.

Components

Actor

External user interacting with system.

Examples:

  • Student
  • Admin
  • Teacher

Use Case

Function provided by system.

Examples:

  • Login
  • Register Course
  • Pay Fees

Advantages

  • Easy to understand.
  • Captures user requirements.
  • Improves communication.

Simple Example

Student ----> Login
Student ----> Register Course
Student ----> View Result

10. Activity Diagram

An Activity Diagram represents workflow and sequence of activities.

Symbols

SymbolMeaning
Start
End
RectangleActivity
ArrowFlow
DiamondDecision

Example: Login Process

Start
|
Enter Username
|
Enter Password
|
Validate
/ \
Yes No
| |
Home Error
|
End

Advantages

  • Shows business processes.
  • Easy visualization of workflow.
  • Identifies decision points.

11. Analysis Class Model

An Analysis Class Model identifies classes during requirement analysis.

Types of Analysis Classes

1. Entity Class

Stores data.

Example: Student, Course

2. Boundary Class

Handles interaction with users.

Example: Login Screen

3. Control Class

Controls application logic.

Example: Registration Controller


Example: Course Registration System

Entity Classes

  • Student
  • Course
  • Registration

Boundary Classes

  • Login Page
  • Registration Form

Control Classes

  • Registration Controller
  • Authentication Controller

Comments