0% found this document useful (0 votes)
13 views11 pages

UML Diagrams in Object-Oriented Programming

uml diagram

Uploaded by

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

UML Diagrams in Object-Oriented Programming

uml diagram

Uploaded by

jdc110977
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT 3: OBJECT-ORIENTED PROGRAMMING

Java Programming

Module 1: Modeling System Processes Using UML Diagrams


📖 Module Overview

This module covers the basic ideas behind Unified Modeling Language (UML) diagrams, which
are essential tools for system analysis and software design. Students will learn how UML gives
us a standard way to visually show complex software architectures, relationships between
objects, and process workflows.

The module starts with activity diagrams showing how logic works and control flows. Students
learn how to model decision points, parallel processes, and algorithmic workflows using swim
lanes, decision nodes, and action states. This foundation makes it easy to see how business
processes and systems work. Next, students look at structural diagrams, like class and component
diagrams. Class diagrams show how objects are related to each other in an object-oriented way,
such as through inheritance, associations, aggregation, and composition. Students learn how to
recognize classes, attributes, methods, and relationships that are the building blocks of software
architecture. Component diagrams help us understand this better by showing how different
system parts work together and depend on each other.

Sequence diagrams, which depict the dynamic interactions between objects over time, are the
next step in the module. To comprehend how a system behaves while it is being executed,
students must be able to represent method calls, message passing, and the temporal ordering of
operations. Real-world application is emphasized through practical exercises such as creating
class hierarchies for software projects, using activity diagrams to model algorithms, and using
sequence diagrams to document object interactions. Upon completing the module, students will
have a thorough understanding of how to create professional UML diagrams that effectively
convey system design to technical and non-technical stakeholders, which is an essential skill for
careers in software engineering and system analysis.

🎯 Learning Outcomes

After completing this module, you should be able to:

 Demonstrate object relationships using class, component, and diagram illustrations.


 Create activity diagrams to represent workflows and algorithms.

📚 Core Content
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

The Unified Modelling Language

The Unified Modeling Language is an industry-standard modeling language with a vibrant


graphic notation and a comprehensive collection of diagrams and components. It is designed to
help developers of systems and applications specify, visualize, define, build, and record software
systems' artifacts.

Brief History of UML

In response to the increasing demand for a standardized modeling language in software


engineering, the Unified Modeling Language (UML) was created in the mid-1990s. Before
UML, developers employed a variety of object-oriented modeling approaches, each with its own
concepts and notations, including Booch, Object Modeling Technique (OMT), and Object-
Oriented Software Engineering (OOSE). Software teams found it challenging to collaborate and
communicate because of this inconsistency.

Ivar Jacobson, James Rumbaugh, and Grady Booch, three prominent software engineers, came
together at Rational Software Corporation in 1994 to combine their disparate modeling
techniques. Known as the "Three Amigos," their objective was to combine the advantages of
their earlier approaches into a single, standardized modeling language.

UML was formally accepted as the standard modeling language for object-oriented system
design by the Object Management Group (OMG) in 1997. With the release of UML 2.0 in 2005,
which brought notable enhancements like new diagram types and improved modeling
capabilities, UML continued to develop through subsequent iterations.

UML Activity Diagram (Logic Representation)

A UML Activity Diagram is a behavioral diagram representing a system's logical flow of


activities or processes. It illustrates how actions are carried out, decisions are made, and control
flows from one activity to another. It models the workflow or algorithm of a particular function
or system operation.

The diagram begins with a start node (a filled circle) and ends with an end node (a circle with a
dot inside). In between are activities represented by rounded rectangles, showing the steps or
tasks performed. Decision nodes (diamond shapes) indicate points where alternative paths may
occur, such as "Yes/No" or "True/False" branches. Arrows connect these elements, showing the
direction of control flow.

Activity diagrams are particularly useful in system analysis and design, as they help visualize
business processes, user interactions, or the logic behind algorithms before implementation. For
example, a login process can be modeled to show steps like entering credentials, validating data,
and granting or denying access.
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

By representing logic visually, UML Activity Diagrams simplify complex processes, making
them easier to analyze, communicate, and refine—ensuring developers and stakeholders share a
clear understanding of system behavior and workflow.

📝 Learning Activities
Activity 1: Personal Reflection
After reading the Core Content above, reflect on your own experience with literature.
Think about a story, poem, or play that made an impact on you. Write a short reflection (about
150–200 words) answering the following questions:
· What was the title of the work, and who wrote it?
· What was it about?
· How did it make you feel or change how you thought about something?
· Why do you still remember it today?
Write your reflection on a separate sheet of paper or in your notebook. This will be part
of your portfolio for the course.

Activity 2: Group Discussion


If you are able to discuss with a classmate or group, talk about these questions:
● Do you think literature is still important today? Why or why not?
● Should literature only include works written in English, or also those in Filipino and
other local languages?

📄 Assessment Task
Write a 300–400 word essay answering the question:
"Why should literature still be taught in schools and universities in the 21st century?
Support your answer with at least one personal experience and one idea from this module."
Write your essay neatly on a separate sheet of paper and submit it to your instructor. This
essay will also form part of your course portfolio.

Deadline: __________________
Submit to/through: __________________

Rubric for Week 1 Essay


Criteria Excellent (4) Proficient (3) Developing (2) Needs
Improvement (1)
Content & Clearly answers the Answers the question; Partially answers the Does not address
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

Relevance question, fully addresses includes a personal question; personal the question or is
why literature should be example and one idea example or module off-topic.
taught; includes a strong from the module, idea is weak or
personal example and a though may lack depth. missing.
clear idea from the module.
Organization Well-organized essay with Mostly organized, Some organization, Poorly organized,
& Coherence logical flow of ideas and ideas are generally but ideas are ideas difficult to
clear paragraph structure. clear and connected. scattered or unclear follow.
at times.
Language & Language is clear, Language is generally Frequent errors that Many errors that
Mechanics appropriate, with few or no clear with some minor occasionally affect make the essay
errors in grammar, spelling, errors. readability. hard to
or punctuation. understand.
Critical Shows deep understanding Shows understanding Shows minimal Lacks reflection,
Thinking & of the module’s ideas, and of module’s ideas, with reflection or critical thought, or
Reflection personal insight is some personal superficial understanding.
thoughtful and meaningful. reflection. understanding of
module’s ideas.
Total Score

Score Range:
● Excellent: 16–14
● Proficient: 13–10
● Developing: 9–6
● Needs Improvement: 5 and below

🔍 Synthesis
The study of literature remains a cornerstone of education because it connects us to the
shared human experience. Literature is not merely a subject to memorize or analyze — it is a
living record of how people from different times and places have understood the world and
expressed their hopes, fears, and dreams. This module has shown that literature serves both as a
mirror, reflecting the realities and concerns of its time, and as a lamp, guiding readers to
imagine what could be and inspiring them to grow.
By engaging with literature, we not only preserve culture and heritage but also cultivate
empathy, creativity, and critical thinking. These qualities are essential not only for personal
development but also for fostering a more understanding and inclusive society. In the classroom,
teaching literature helps students see themselves in stories, appreciate the diversity of
perspectives, and find their own voices.
Reflecting on your personal experiences with literature allows you to see its
transformative potential — how a poem, story, or play can stay with you and shape how you
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

think or feel. As educators and lifelong learners, you now have a deeper appreciation of why
literature continues to deserve a place in our schools and universities: because it speaks to the
heart and mind, shaping both individuals and communities.

🧠 Key Takeaways
At the end of this module, you should remember these essential points:
● Literature refers to creative and imaginative writing — including poetry, fiction, and
drama — that reflects and expresses human thoughts, feelings, and experiences.
● Literature mirrors society by showing us our values, struggles, and aspirations, and it
serves as a lamp by inspiring change and illuminating possibilities for the future.
● Reading and analyzing literature develops critical thinking, empathy, creativity, and
cultural awareness. These skills are crucial in both personal and professional contexts.
● In education, literature helps students engage with language deeply, see themselves and
others in stories, and develop reflective and open-minded attitudes toward the world.
● Even in a fast-changing, technology-driven world, literature remains relevant because it
addresses timeless questions of identity, morality, and human connection.
By keeping these takeaways in mind, you will be better prepared not only to understand and
appreciate literature but also to help others discover its value in their own lives.

📖 Supplementary Resources
If you’d like to explore the topic further or deepen your understanding, here are some
optional readings and materials you can check:

📚Readings
● Terry Eagleton, Literary Theory: An Introduction
● Matthew Arnold, The Function of Criticism at the Present Time
● Stories and Poems by Filipino Writers (Nick Joaquin’s May Day Eve, Edith Tiempo’s
poetry)

🎥 Videos
● Video: Why Literature? (Harvard Humanities Project)
● TED Talk: David JP Phillips — The Magical Science of Storytelling

You can choose one or two that interest you most, and reflect on how they relate to what you
learned in this module.
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

📖 References
Eagleton, T. (2008). Literary theory: An introduction (Anniversary ed.). University of
Minnesota Press.
Arnold, M. (1865). The function of criticism at the present time. Essays in Criticism.
Harvard Humanities Project. (n.d.). Why Literature? Harvard University.

Got it ✅ You want a Module (a teaching or learning material) on the topic:


UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

“Using UML: Activity Diagram Logic Representation, Basic Class, Component, and
Sequence Diagrams to Visualize Object Relationships, and Creating Activity Diagrams to
Model Algorithm Workflow.”

Below is a complete Module format suitable for classroom or e-learning use — clear,
structured, and ready to include in a PowerPoint or LMS.

📘 Module Title:
Modeling System Processes Using UML Diagrams

🧩 Learning Objectives

After completing this module, learners will be able to:

1. Explain the purpose and logic of UML activity diagrams.


2. Identify and describe the components of basic UML class, component, and sequence
diagrams.
3. Visualize object relationships using class and sequence diagrams.
4. Create UML activity diagrams to represent algorithm workflows.

🧠 Lesson Overview

Unified Modeling Language (UML) provides a standardized way to visualize the design of a
system. This module introduces key UML diagrams that help represent logic, relationships, and
workflows in system development.

📖 Lesson Content

1. UML Overview

 Definition:
UML (Unified Modeling Language) is a visual modeling language used to describe,
design, and document the structure and behavior of software systems.
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

 Purpose:
To help developers, designers, and stakeholders understand system functionality through
visual representation.

2. UML Activity Diagram (Logic Representation)

 Purpose: Models the flow of control or data in a system.


 Key Symbols:
o Start Node: Solid black circle — marks the beginning of a process.
o Activity/Action: Rounded rectangles — tasks or steps.
o Decision Node: Diamond shape — represents branching (Yes/No, True/False).
o End Node: Circle with an inner black dot — process termination.
 Example Use Case:
Representing the workflow of a login system.

🧩 Example Activity Diagram: Login Process

Start → [Enter Username & Password] → [Validate Credentials]


├──> [Valid] → [Access Dashboard] → End
└──> [Invalid] → [Display Error] → [Retry]

3. UML Class Diagram (Visualizing Object Relationships)

 Purpose: Shows the static structure of a system — classes, attributes, operations, and
relationships.
 Key Elements:
o Class: Rectangle divided into 3 parts (Class name, Attributes, Methods).
o Relationships:
 Association: Solid line (e.g., Student → enrolls in → Course).
 Inheritance: Arrow with an empty head (e.g., Teacher inherits Person).
 Aggregation/Composition: Diamond shapes (whole–part relationships).

🧩 Example:

Class: Student
----------------------
+ studentID : int
+ name : string
+ enroll()
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

4. UML Component Diagram

 Purpose: Represents how components (modules, systems, or subsystems) interact in


software architecture.
 Key Symbols:
o Component: Rectangle with two small rectangles (tabs) on the left.
o Interface: Circle (lollipop symbol) for provided interfaces.
o Dependency: Dashed arrow from dependent component to provider.

🧩 Example Use Case:

 Login Component depends on User Database Component for credential validation.

5. UML Sequence Diagram

 Purpose: Describes how objects interact over time through messages.


 Key Elements:
o Actors and Objects: Horizontal lifelines at the top.
o Messages: Arrows showing interactions.
o Activation Bars: Narrow rectangles showing the object’s active period.

🧩 Example: Login Sequence

Actor: User
Object: LoginPage, AuthSystem, Database

Flow:

1. User → LoginPage: Enter Credentials


2. LoginPage → AuthSystem: Send Data
3. AuthSystem → Database: Verify User
4. Database → AuthSystem: Return Result
5. AuthSystem → LoginPage: Display Success or Error

6. Creating Activity Diagrams to Model Algorithm Workflow

 Steps:
1. Identify the start and end of the algorithm.
2. List main actions and decision points.
3. Arrange them in logical order with flow arrows.
4. Review for clarity and logical consistency.
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

🧩 Example: Algorithm for Sorting Numbers

Start → [Input List of Numbers] → [Compare Adjacent Numbers]


├──> [If Out of Order] → [Swap Numbers]
└──> [Continue Until Sorted] → End

💡 Activity / Task

Create UML diagrams for this Scenario:

A student logs in to an e-learning system, views available courses, and enrolls in one.

Tasks:

1. Draw an Activity Diagram for the login and enrollment workflow.


2. Create a Class Diagram showing the relationships among Student, Course, and
Enrollment.
3. Make a Sequence Diagram showing interactions between Student, System, and
Database.

📝 Assessment
Needs
Criteria Excellent (10) Good (8) Fair (6)
Improvement (4)
UML Correct use of UML Minor symbol Some missing Incorrect diagram
Accuracy symbols and logic errors connections structure
Easy to read and
Clarity Mostly clear Some confusion Hard to follow
understand
Clear and
Creativity Innovative representation Ordinary layout Poor visual appeal
functional

📚 Summary

UML provides multiple diagrams to represent system processes:

 Activity Diagram: Logic and workflow


 Class Diagram: Object structure and relationships
 Component Diagram: Software architecture
 Sequence Diagram: Object interaction flow
UNIT 3: OBJECT-ORIENTED PROGRAMMING
Java Programming

Together, these diagrams help developers visualize, analyze, and document complex systems
effectively.

Would you like me to generate visual UML diagrams (images) for the examples above (e.g.,
login activity, class, component, and sequence diagrams) so you can include them in your
module or PowerPoint?

You might also like