0% found this document useful (0 votes)
8 views7 pages

Dynamic Structural Modeling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views7 pages

Dynamic Structural Modeling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Dynamic and Structural

Modeling in Java
Unit 2: Detailed Concepts and
Examples
Basic Behavioral Modeling
• 1. Use Cases: Describe system functionalities
from the user's perspective.
• 2. Use Case Diagrams: Show interactions
between actors and use cases.
• 3. Activity Diagrams: Represent workflows
with decisions and actions.
• 4. State Machine Diagrams: Show transitions
between object states.
• 5. Process and Threads: Handle concurrent
operations.
Use Case Example: User Login
Use Case: User logs into the system.
Actors: User
Flow:
1. User enters credentials.
2. System validates credentials.
3. User gains access to the system.

[Insert Use Case Diagram Here]


Activity Diagram Example: Login
1. Start: User initiatesFlow
Activity Flow:
login.
2. Authenticate: System checks credentials.
3. Decision: Success or failure?
- If success, grant access.
- If failure, deny access.
4. End: Login process completes.
[Insert Activity Diagram Here]
Structural Modeling
• 1. Translating Classes into Data Structures:
Store class objects in collections like ArrayList.
• 2. Passing Arguments to Methods:
Communicate between objects and methods.
• 3. Implementing Inheritance: Share attributes
and methods using parent-child relationships.
Example: Translating Classes into
Data Structures
• Class Example:
• class Student {
• String name;
• int id;
• }

• Store Objects:
• List<Student> students = new ArrayList<>();
Example: Inheritance
• Inheritance Example:
• class Parent {
• void display() {
• System.out.println("This is the parent
class");
• }
• }

• class Child extends Parent {

You might also like