UML Interview Questions for freshers experienced :-
1. Difference between Activity and Sequence Diagram.
- Activity diagram: captures the process flow. They are used for functional modeling.
- Sequence diagram: the track the interaction between the objects. They are used for dynamic modeling.
2. What is the difference between Activity and sequence diagrams?
The following are the difference between Activity and Sequence Diagrams:
A sequence diagram shows the way of processes execute in a sequence. For example, the order of operations and the parameters.
- An activity diagram depicts the operational workflows.
- A sequence diagram is focused to represent interactions between different objects.
- Activity diagram shows the actions for various objects.
3. Explain the different elements of a Use Case?
Use case diagram is a subset of various behaviour diagrams. Use case diagrams are used to provide concrete examples of the elements which are supposed to implement. It is used to analyze objects.
The following are the elements of the use case diagrams:
- Actors: An actor is one of the entities who perform certain actions. These roles are the actual business roles of the users in given system. An actor interacts with a use case of the system. For example, for a banking system, a customer is one of the actors.
- Use Case: A use case is a use case diagram of UML represents a business functionality that is distinct. The use case should list the discrete business functionality that is specified in the problem statement. Every business functionality is a potential use case.
- System boundary: A system boundary defines the scope of the system. The systems that use cases also need to be defined in the limits of the system. The system boundary is shown as a rectangle that spans all use cases of the system.
4. Brief explanation of all elements in activity diagrams
- Activities: An activity indicates an action that performed in the system.
- Transitions: Transitions are represented by open arrow heads. Transitions are used to indicate the flow among elements in the diagram.
- Decision Points: The logical branching is depicted by the decision points.
- States: A state is shown in a rounded rectangle. States are indicated to mention the mile stones of processing in the activity diagrams.
5. What are the different elements of a collaboration diagram?
- Object: The interaction between objects takes place in a system. An object is depicted by a rectangle with the name of the object, preceded by a colon and underline.
- Relation/Association: Association among objects is linked by connecting them. The cardinality can be depicted by placing qualifiers on either ends.
- Messages: An arrow that commencing from one object to the destination object. This depicts the interaction between objects. The sequence or order of the interaction is depicted by the number.
6. Explain all elements of a State-chart diagram.
- Initial State: The first or the default state the object is in. It is denoted by a solid circle.
- State: All the states an object can go in are mentioned in this. It is represented by a rectangle with rounded edges.
- Transitions: depicted by arrow from the source state to destination state.
- Final State: Depicts the end of the. It is shown by a bull’s eye symbol.
7. What are the elements in State Chart diagrams?
- Initial State: This state shows the first activity of the flow.
- State: A state represents the state of an object at a particular given point of time.
- Transition: The transition from one state to another state of objects is represented by an arrow.
- Event and Action: A trigger that causes a transition to occur.
- Signal: When a message or a trigger caused by an event to a state, which causes a transition, this message is called as a signal.
- Final State: The state diagram ends with a diagram that depicts a bull?s eye is known as Final State.
8. What are the parts of a deployment diagram?
- Nodes: A node represents any hardware component. The configuration of hardware is represented by attributes of nodes.
- Components: A component represents software. Each component straightly represents a class or object that in turn represents methods.
- Dependencies: The reliability of one component with that of another is depicted by dependencies.
- Links: To tie up tow nodes, the links are utilized. The links are implemented by using nodes and their associations.
9. What are the various components in sequence diagrams?
- Actor: Actor represents an external user / end user who interact with the system.
- Object: Object is represented by one of components of the system.
- Unit: A unit is a subsystem, or a sub component or other entity within the system.
- Separator: Separator represents a boundary among sub systems, components or units.
- Group: Represents different header elements in the subsystem.
10. What is component diagrams in UML?
A component diagram is particularly useful with teams of larger size. UML components are great to perform architectural landscape for a specific system. The component diagram allows to model high level software components and interfaces to those components. The sub team?s effort is very less, once the interfaces are perfectly designed and accepted by the team members.

11. What are the advantages of using UML?
- Advantages of using UML breaks the complex system into discrete pieces that can be understood easily.
- Handover the system to new team becomes easier.
- Complex system can be understood by the disparate developers who are working on different platforms.
- UML model is not a system or platform specific. It unifies all disparate developers under one roof.
12. Explain the types of diagrams in UML.
We have nine types of diagram in UML.
Use Case Diagram:
Use Case Diagram describes ?HOW? the system works. It identifies the primary elements and processes that form the system. It shows ?actors? and their ?roles?
Class Diagram:
This diagram explores detail design of the system. The class diagram is designed using Use Case diagram. We can identify all ?Nouns? in use cases as classes and ?verbs? as method of the classes.
Object diagram:
This diagram represents the state of classes in the system and their relationships or associations at a specific point of time.
State Diagram:
This diagram represents different states that objects in the system undergo during their life cycle.
Sequence diagram:
This diagram is used to explore logic of complex operations, function or procedure. In this diagram, sequence of the interactions between the objects is represented step by step.
Collaboration diagram:
This diagram groups together the interaction between different objects.
Activity diagram:
Activity diagram gives detail view of the business logic.
Deployment diagram:
It shows deployment view of the system. It shows how hardware and software works together to run system.
13. Define SDLC in UML?
- SDLC is Software Development Life Cycle.
- SDLC of a system included processes like Use case driven, Architecture centric, Iterative and Incremental. This Life cycle is divided into phases.
- Phase is a time span between two milestones.
- The milestones are Inception, Elaboration, Construction, and Transition.
- Process Workflows that evolve through these phase are Business Modeling, Requirement gathering, Analysis and Design. Supporting Workflows are configuration, change management, and project management.
14. What are the different views in UML?
- Use Case view – Presents the requirements of a system.
- Design View – Capturing the vocabulary.
- Process View – Modeling the systems processes and threads.
- Implementation view – Addressing the physical implementation of the system.
- Deployment view – Model the components required for deploying the system.
15. Define modeling in UML and it advantages.
- Model is a simplification of reality.
- Blueprint of the actual system.
- Specify the structural and behavior of the system.
- Templates for designing the system.
- Helps document the system.
16. What are UML Messages?
Specification of a communication
17. What is UML Architecture?
Takes care structural and behavioral aspect of a software system.
Includes software usage, functionality, performance, reuse, economic and technology constraints.
18. What are the three types of modeling in UML?
- Structural,
- behavioral,
- architectural
19. What is UML?
- UML is Unified Modeling Language.
- Graphical language for visualizing artifacts of the system.
- Allow to create a blue print of all the aspects of the system.
20. What are Relationships?
There are different kinds of relationships: Dependencies, Generalization, and Association. Dependencies are relations ships between two entities that that a change in specification of one thing may affect another thing. Most commonly it is used to show that one class uses another class as an argument in the signature of the operation. Generalization is relationships specified in the class subclass scenario, it is shown when one entity inherits from other. Associations are structural relationships that are: a room has walls, Person works for a company. Aggregation is a type of association where there is a has a relationship, That is a room has walls, no if there are two classes room and walls then the relationship is called a association and further defined as an aggregation.
21. What is SDLC?
SDLC is Software Development Life Cycle. SDLC of a system included processes that are Use case driven, Architecture centric and Iterative and Incremental. This Life cycle is divided into phases. Phase is a time span between two milestones. The milestones are Inception, Elaboration, Construction, and Transition. Process Workflows that evolve through these phase are Business Modeling, Requirement gathering, Analysis and Design, Implementation, Testing, Deployment. Supporting Workflows are Configuration and change management, Project management.
22. What is modeling? What are the advantages of creating a model?
Modeling is a proven and well-accepted engineering technique which helps build a model. Model is a simplification of reality; it is a blueprint of the actual system that needs to be built. Model helps to visualize the system. Model helps to specify the structural and behavior of the system. Model helps make templates for constructing the system. Model helps document the system.
23. What are the different views that are considered when building an object-oriented software system?
Normally there are 5 views. Use Case view – This view exposes the requirements of a system. Design View – Capturing the vocabulary. Process View – modeling the distribution of the systems processes and threads. Implementation view – addressing the physical implementation of the system. Deployment view – focus on the modeling the components required for deploying the system.
24. What are diagrams?
Diagrams are graphical representation of a set of elements most often shown made of things and associations.
25. What are Messages?
A message is the specification of a communication, when a message is passed that results in action that is in turn an executable statement.
26. Explain about executable UML?
Executable does not use full functionality and standards as present in UML. Although there are many constructs present in UML all of them are not used for designing, executable UML uses only limited number of constructs.
27. Explain about the difficulties of interchange format of UML?
XML standard should allow interchange of UML models but it is not the case scenario practically. Portability of the language from one format to another format is not possible and lack of information can be possible in the course. It also lacks sufficient details which make it impossible for interchange between modeling tools.
28. What are the different elements of a collaboration diagram?
- Object: The interaction between objects takes place in a system. An object is depicted by a rectangle with the name of the object, preceded by a colon and underline.
- Relation/Association: Association among objects is linked by connecting them. The cardinality can be depicted by placing qualifiers on either ends.
- Messages: An arrow that commencing from one object to the destination object. This depicts the interaction between objects. The sequence or order of the interaction is depicted by the number.
29. State some benefits of iterative development?
Some of the benefits offered by iterative development are as follows: –
- Mitigation of risks in an earlier stage
- Visibility of progress
- Feedback, adaptation and engagement.
- Complexity management
- Iteration management can improve the overall process of the project because it details and explains the various steps present in it.
30. Define SDLC in UML?
- SDLC is Software Development Life Cycle.
- SDLC of a system included processes like Use case driven, Architecture centric, Iterative and Incremental. This Life cycle is divided into phases.
- Phase is a time span between two milestones.
- The milestones are Inception, Elaboration, Construction, and Transition.
- Process Workflows that evolve through these phase are Business Modeling, Requirement gathering, Analysis and Design. Supporting Workflows are configuration, change management, andproject management.
