UML Basic Interview Questions Part-2



QUESTION - What are the three types of modeling in UML?
ANSWER -
Structural, behavioral, and architectural.
QUESTION - What is Architecture?
ANSWER -
Takes care structural and behavioral aspect of a software system.
Includes software usage, functionality, performance, reuse, economic and technology constraints.
QUESTION - What are Messages?
ANSWER -
Specification of a communication.

What are the different steps involved in object oriented analysis?

The objectives or the steps that are involved in object-oriented analysis and design are:
Create use cases to find the ways that a system can interact with the environment. It also helps to build an overall structure using the objects of the system and allow easy to use model to follow on.
Identify the actors and objects that are involved: identifying the actors and the objects with their attribute and method names makes it easy to structure the system such that a flow gets created which help in designing the overall system.
Establish the relationships between objects: establishing a relationship between different objects allow the design to become more clear and usable.
Establish an interface of each object: allows the object to be seen in a position and the exception handling can also be put up so that if any error occurs it will be known before moving forward.
Implementation and testing of objects takes place to see the proper implementation of the objects and test it to match the environments and needs.
Assemble the complete system for use and make it ready to be used by users.

Why analysis is a major part in Object designing?
Analysis allows the decomposition to be done to build the components parts to help in computing the process and specify the system structure. This also allows the proper defining of the functions that are independent to each other. Analysis is done by decomposing the modules or the components. It is usually performed in top-to-bottom fashion using the structured analysis. This method is also called as functional decomposition. This functional decomposition combine with separate data analysis to build a goal that is clear and allow the system to be defined in their own terms. Analysis allows the identification to be performed to find the business process, actors that are involved in the function and the end result that has to be achieved.

Why is it required to have an abstraction layer in UML?

Abstraction allows the identification of key domain objects to match the user requirements. Abstraction keeps all the code at one place allow the physical design to be given at later stage. Abstraction also allows the structure to be maintained as it is and the alternation won't affect the overall system if changes are imposed on the system as whole. It keeps the data of relationship between other objects and their associations with each other. The association has to be maintained such that one's affect won't have any impact on anothe entity that is used in UML. It keeps the data and programs in the same form and keeps their meaning also intact. It hides the implementation details from the users. It reduces the load from the programmer and allow more time to implement the system in complete.

What is the difference between Responsibility-driven and data-driven approaches?

Data centered approach allow the data to be more stable than functions but this is not the case all the time and there is a possibility of having many structured techniques to handle this approach. Whereas, responsibility driven approach keeps a balance in between both the data and functions and doesn't use many structured techniques.
Data driven method that represent the traditional entity-relationship modelling, whereas Responsibility-driven approach represent the modern relationship that exists between different entities of the object.
Data driven method used classes that are represented by static data variables where one class accessed the varibable and encapsulated the control rules for the application. Whereas, responsibility driven method divided the behavior between many classes across where it produced more reusable classes that can be represented separately.

What is the difference between translational and elaborational approaches?

Elaborational approach treat a passage separating their specification from the
implementation to create a new initial model and then adding more details to it till the code is not compiled. Whereas, translational approach is the process that defines a sequence of separate models put together that includes a procedure for linking them. It also translates one object from another object.
Elaborational approach ellaborate the object model such that there is no requirement left and all the requirements gets clarified at first go. The ellaboration happens in many phases and when the stages are final than the model gets ready. Whereas, the translational approach goes through one state to another state on some action only.

What is the function of attribute facets in UML?

Attribute facets consists of the associations and operations that are defined for other types. It uses two ways first one being the shorthand for the get and set operations and another one is to provide the type of the attribute to use. The attribute facets defines the classes that are tagged with some information and uses {tag=value}. The tags include the following attributes like:
description: defines the descriptive text that is used to define an object.
Keyword: defines the keyword that classifies an object
Abstract classes use the attributes that is used in types not in classes. UML supports the following annotations, facets:
default (or initial) value (name:Type=expression)
visibility prefix (+ = public, – = private, # = protected)

No comments:

Post a Comment