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.
| Notation | Description |
|---|---|
| Class | Represents a blueprint of objects |
| Object | Instance of a class |
| Actor | External user interacting with system |
| Use Case | Function provided by system |
| Association | Relationship between classes |
| Package | Group of related classes |
| Interface | Defines 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
| Stereotype | Meaning |
|---|---|
| <<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 Analysis | OO Analysis |
|---|---|
| Function-oriented | Object-oriented |
| Focus on processes | Focus on objects |
| Uses DFDs | Uses UML diagrams |
| Data and functions separate | Data and functions together |
| Difficult maintenance | Easy maintenance |
| Less reusable | More 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
- Requirement Gathering
- Requirement Analysis
- Requirement Specification
- 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
| Symbol | Meaning |
|---|---|
| ● | Start |
| ◎ | End |
| Rectangle | Activity |
| Arrow | Flow |
| Diamond | Decision |
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
Post a Comment