Se Viva Answers
Se Viva Answers
2. Why We Model?
3. Principles of Modeling
<<include>>: A use case includes functionality from another use case (e.g., Login
includes VerifyCredentials).
<<extend>>: A use case extends another under certain conditions (e.g., Search
extends FilterResults).
Example: The Payment use case may extend ApplyDiscount if a discount is
available.
7. Define Interface
8. Define Use-Case
A use case represents a specific interaction between a user (or another system) and the
system being modeled.
Example: The PlaceOrder use case defines the steps a customer follows to place an
order in an online store.
Collaboration Diagram: Describes how objects interact to achieve a goal (e.g., how
Customer, Order, and Payment objects work together to complete a purchase).
Deployment Diagram: Represents physical deployment (e.g., WebServer hosting the
UserInterface component and DatabaseServer hosting the Database component).
Package: A container that groups related elements like classes or components (e.g., a
User package containing Customer and Admin classes).
Owned Element: Elements owned by a package (e.g., a Product class inside the
Inventory package).
Fork: Splits a flow into concurrent paths (e.g., after logging in, both Order and
Payment processes begin simultaneously).
Join: Merges multiple concurrent paths back into one flow (e.g., after both Order and
Payment processes finish, the flow merges to complete the order).
Multiplicity: Defines the number of instances involved (e.g., a Customer can place 1
or more Orders).
Roles: Describes the role of each class in the relationship (e.g., Customer and Order).
Navigability: Indicates which class can access another (e.g., Order class can access
Customer but not vice versa).
Name: Person
Attributes: name, age
Operations: getName(), getAge()
Relationships: Association with other classes like Address and Order.
Modular part.
Example: A PaymentService is a modular part of a larger e-commerce system.
Composition is a stronger form of aggregation where the part cannot exist without
the whole (e.g., a House class contains Room objects; if the house is deleted, so are the
rooms).
Stereotype is a way to extend the UML to represent specific types of elements (e.g.,
<<interface>>).
Example: <<interface>> PrintService.
Forward Engineering: Creating code from design models (e.g., generating Java code
from UML diagrams).
Reverse Engineering: Creating models from existing code (e.g., generating UML
class diagrams from source code).