0% found this document useful (0 votes)
10 views6 pages

Se Viva Answers

Uploaded by

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

Se Viva Answers

Uploaded by

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

1.

Building Blocks of UML

 Structure Diagrams: Class diagram, Object diagram, Component diagram,


Deployment diagram, etc.
 Behavior Diagrams: Use case diagram, Sequence diagram, Activity diagram, State
diagram, etc.
 Interaction Diagrams: Sequence diagram, Communication diagram, Timing
diagram, Interaction overview diagram.
 Example: A Class Diagram showing Person class with attributes like name, age,
and relationships with Address and PhoneNumber.

2. Why We Model?

 To simplify complex systems.


 To visualize and understand the system's structure and behavior.
 To ensure communication among team members.
 Example: Using a Class Diagram to clarify how different classes interact in an e-
commerce system, ensuring no ambiguity between classes like Order, Product, and
Customer.

3. Principles of Modeling

 Abstraction: Hide irrelevant details.


 Modularity: Break the system into smaller, manageable pieces.
 Consistency: Ensure uniformity across the model.
 Correctness: Reflect the real system accurately.
 Comprehensibility: Make sure the model is understandable by all stakeholders.
 Example: Breaking a complex system into smaller components, such as a
PaymentService and ShippingService, making it easier to manage.

4. Common Mechanisms of UML

 Association: A relationship between two classes (e.g., Customer and Order).


 Generalization: A hierarchical relationship (e.g., Dog and Cat inherit from Animal).
 Dependency: One element depends on another (e.g., Customer depends on Address
for delivery).
 Realization: A class implements an interface (e.g., Employee class implements
EmployeeInterface).
 Aggregation: Whole-part relationship (e.g., Team has multiple Player objects).
 Example: A Car class that uses an Engine class (<<use>>).

5. Stereotypes for Dependency Between Classes

 <<use>>: One class uses another.


 <<access>>: One class accesses another.
 <<create>>: One class creates another.
 <<instantiate>>: One class instantiates another.
 Example: Car class depends on Engine class, represented by <<use>>.
6. Stereotypes Between Use Cases and Packages

 <<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

 An interface is a contract specifying a set of operations without implementing them.


 Example: An interface Printable with the method print(), and classes like
Document and Image implementing this 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.

9. Define Component and Class

 Component: A modular part of a system (e.g., PaymentProcessor handling payment


transactions).
 Class: A blueprint for creating objects, defining their properties and behaviors (e.g.,
Customer class with attributes like name, email).
 Example: A Payment component interacting with external APIs to process payments.

10. Define Collaboration & Deployment

 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).

11. Define Pattern & Framework

 Pattern: A reusable solution to a commonly occurring problem (e.g., Singleton


Pattern for ensuring a single instance of a class).
 Framework: A collection of libraries or components that provide basic functionality
to help developers build applications (e.g., Spring Framework for Java applications).

12. Define Instances and Types of Instances

 Instance: A specific occurrence of a class (e.g., johnDoe is an instance of the Person


class).
 Types of Instances: Objects (e.g., an instance of the Person class) or components
(e.g., a specific instance of a PaymentProcessor component).

13. Define Package & Owned Element

 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).

14. Difference Between Sequence & Collaboration Diagram

 Sequence Diagram: Focuses on the order of messages exchanged between objects


over time (e.g., Customer sends PlaceOrder to ShoppingCart).
 Collaboration Diagram: Focuses on the relationships between objects and how they
interact (e.g., showing how Customer, ShoppingCart, and Payment collaborate to
process an order).

15. Define Interface and Representations of Interfaces

 An interface defines a set of method signatures without implementations.


 Representation: Shown as a circle labeled with <<interface>> or a class symbol
with the <<interface>> stereotype.
 Example: <<interface>> Printable.

16. Difference Between Class & Interface

 Class: Can have both attributes and methods with implementations.


 Interface: Only defines method signatures; no implementation.
 Example: A Car class might have methods like startEngine(), while a Drivable
interface might define drive() without implementation.

17. Define Fork & Join in Activity Diagram

 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).

18. Define Swim-lane and Its Use in Activity Diagram

 Swim-lane: Divides an activity diagram to represent different actors or components.


 Use: Helps show responsibilities (e.g., a Customer lane and a System lane in a
purchase process).

19. Common Modeling Techniques

 Data Flow Diagram: Represents the flow of data through a system.


 State Machine Diagram: Models the different states an object can be in (e.g., Order
state transitions from Pending to Shipped).

20. Properties of Association Relationships

 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).

21. Standard Elements of a Class

 Name: Person
 Attributes: name, age
 Operations: getName(), getAge()
 Relationships: Association with other classes like Address and Order.

22. Complete Syntax of Attributes in Class


 visibility name : type [multiplicity] {optional constraints}
Example: + name : String {maxLength=50}

23. Syntax of Operations in Class

 visibility name(parameters) : returnType {optional constraints}


Example: + getAge() : Integer

28. Component is a ______ part of a System

 Modular part.
Example: A PaymentService is a modular part of a larger e-commerce system.

29. How to Represent a Component?

 A component is represented as a rectangle with the label <<component>>, such as


<<component>> PaymentService.

30. How to Represent an Artifact?

 An artifact is represented as a rectangle with a tab at the top labeled <<artifact>>


DatabaseSchema.

31. How to Represent Nodes?

 Nodes are represented as 3D rectangular boxes, such as <<node>> WebServer.

34. What is Aggregation?


 Aggregation is a whole-part relationship where the part can exist independently (e.g.,
a Team class has many Player objects, but players can exist without the team).

35. What is Composition Relationship?

 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).

36. What is a Note and How to Represent It?

 A note is used to add explanations to a model and is represented by a rectangle with a


folded corner.
Example: A note could explain a specific behavior of a class, such as "This class
handles user authentication."

37. How to Represent a Package?

 A package is represented as a folder icon, e.g., <<package>> Inventory containing


classes like Product and Category.

39. What is Multiplicity?

 Multiplicity defines the number of instances involved in an association (e.g., 1..*


means one or more instances).
Example: 1..* between Customer and Order means a customer can place many
orders.

40. What is Stereotype and Why is it Used?

 Stereotype is a way to extend the UML to represent specific types of elements (e.g.,
<<interface>>).
Example: <<interface>> PrintService.

44. 5 Essential Elements to Draw a Component Diagram?

 Components (e.g., PaymentService, AuthenticationService).


 Interfaces (e.g., <<interface>> PaymentGateway).
 Relationships (e.g., PaymentService depends on PaymentGateway).
 Ports (e.g., where PaymentService connects with other components).
 Connectors (lines showing how components communicate).

46. Different Types of Testing?

 Unit Testing: Testing individual components (e.g., testing addItem() in a shopping


cart).
 Regression Testing: Ensuring existing functionality works after changes.
49. Difference Between Forward and Reverse Engineering?

 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).

50. Different Tools for Forward and Reverse Engineering

 Forward Engineering Tools: Enterprise Architect, Visual Paradigm.


 Reverse Engineering Tools: JArchitect, UMLet.

You might also like