Categories
UML Interview Questions and Answers
1. What are UML Diagrams?
UML serves a great way of creating professional documentation which is a necessary part of any project development. UML is an essential part of creating an object-oriented design of systems. It provides you means for creating powerful models and designs for rational systems which can be understood without much difficulties.
2. What is a model?
A model is a simplification of reality.
1) Blueprint of system
2) Organization of the system
3) Dynamic of the system
3. What is UML Relationship?
4. What is Class in UML Diagram?
5. What is Class Diagram?
Class Diagram defines the types of objects in the system and the different types of relationships that exist among them. It gives a high-level view of an application. This modeling method can run with almost all Object-Oriented Methods. A class can refer to another class. A class can have its objects or may inherit from other classes.
6. What is Object Diagram in UML?
Objects are the real-world entities whose behavior is defined by the classes. Objects are used to represent the static view of an object-oriented system. We cannot define an object without its class. Object and class diagrams are somewhat similar.
7. What is the Use Case Diagram?
8. What is a State Machine Diagram?
9. What is a Statechart Diagram?
10. What is an Activity Diagram in UML?
11. Why use Activity Diagrams?
1) Use cases
2) Classes
3) Interfaces
4) Components
5) Collaborations
12. What is Interaction Diagram?
13. What is Component Diagram in UML?
14. What is Component in OOAD?
It is a modular part of a system that encapsulates its contents. They are the logical elements of a system that plays an essential role during the execution of a system.
A component is similar to a black box whose external behavior is defined by a provided interface and required interfaces.
15. What is Deployment Diagram?
The deployment diagram maps the software architecture created in design to the physical system architecture that executes it. In distributed systems, it models the distribution of the software across the physical nodes.
16. What is an artifact?
1. Source files
2. Executable files
3. Database tables
4. Scripts
5. DLL files
6. User manuals or documentation
7. Output files
17. What is Aggregation?
18. What is Composition?
19. Association Vs. Aggregation Vs. Composition
Association | Aggregation | Composition |
Association relationship is denoted using an arrow. | Aggregation relationship is denoted using a straight line with an empty arrowhead at one end. | Composition relationship is denoted using a straight line with a filled arrowhead at any one of the ends. |
Association can exist between two or more classes in UML. | Aggregation is a part of an association relationship. | The composition is a part of an association relationship. |
There can be one-one, one-many, many-one, and many-many association present between the association classes. | Aggregation is considered as a weak type of association. | The composition is considered as a strong type of association. |
In an association relationship, one or more objects can be associated with each other. | In an aggregation relationship, objects that are associated with each other can remain in the scope of a system without each other. | In a composition relationship, objects that are associated with each other cannot remain in the scope without each other. |
Objects are linked with each other. | Linked objects are not dependent upon the other object. | Objects are highly dependent upon each other. |
In UML Association, deleting one element may or may not affect another associated element. | In UML Aggregation, deleting one element does not affect another associated element. | In UML Composition, deleting one element affects another associated element. |
20. Things in UML
1) Structural things
2) Behavioral things
3) Grouping things
4) Annotational things