Saturday, June 16, 2012

uml interview questions-1



  • Define UML?

Unified Modeling Language, a standard language for designing and documenting a system in an object-oriented manner
It has nine diagrams which can be used in design document to express design of software architecture.


  • Can you explain use case diagrams?

Use case diagram answers what system does from the user point of view.
Use case answer ‘What will the system do?


Scenario: A scenario is a sequence of events which happen when a user interacts with the system.
Actor: Actor is the who of the system, in other words the end user.
Use Case: Use case is task or the goal performed by the end user


  • Can you explain class diagrams?

Class is basically a prototype which helps us create objects.


  • Multiplicity?

Multiplicity can be termed as classes having multiple associations or one class can be linked to instances of many other classes.

  • Can you explain object diagrams in UML?

Classes come to live only when objects are created from them. Object diagram gives a pictorial representation of class diagram at any point of time.


  • Can you explain sequence diagrams?

Sequence diagram shows interaction between objects over a specific period time

http://www.codeproject.com/Articles/28445/UML-Interview-Questions-Part-1#Canyouexplainusecasediagrams







  • 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




  • What are the different views that are commonly used when developing Software in Java?

A) 1) Use Case View - Describes the system from the User's point of view, Describes the various functionalities expected from the system to be developed and how user is going to interact with those features.
2) Class Diagram - Shows graphically the relationships between classes and packages.
3) Sequence Diagram - Shows the sequence of method calls and interactions between classes.
4) Component Diagram - Shows the components within the system and the interaction between components.

http://www.javajotter.net/uml/interview_questions/umlinterviewquestions.php


  • What are diagrams? 

Diagrams are graphical representation of a set of elements


  • How are the diagrams divided? 

The nine diagrams are divided into static diagrams and dynamic diagrams.

Static Diagrams (Also called Structural Diagram):
Class diagram, Object diagram, Component Diagram, Deployment diagram.

Dynamic Diagrams (Also called Behavioral Diagrams):
Use Case Diagram, Sequence Diagram, Collaboration Diagram, Activity diagram, Statechart diagram.



  • What are the major three types of modeling used? 

Major three types of modeling are structural, behavioral, and architectural.



  • the different kinds of modeling diagrams used?


Use case diagram
Class Diagram
Object Diagram
Sequence Diagram
statechart Diagram
Collaboration Diagram
Activity Diagram
Component diagram
Deployment Diagram




  • 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


  • What are Relationships? 


There are different kinds of relationships:
Dependencies
Generalization
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 relation ship,
That is a room has walls, if there are two classes room and walls then the relation ship is called a association and further defined as an aggregation.



http://www.techinterviews.com/uml-interview-questions-and-answers



  • What is Association?


Association is a relationship between two classes.
In this relationship the object of one instance perform an action on behalf of the other class.
The typical behaviour can be invoking the method of other class and using the member of the other class.

public class MyMainClass{

public void init(){

new OtherClass.init();
}

}




  • What is Aggregation?

Aggregation has a relationship between two classes.
In this relationship the object of one class is a member of the other class.
Aggregation always insists for a direction.

public class MyMainClass{

OtherClass otherClassObj = new OtherClass();




http://www.java-questions.com/oops_interview_questions.html
http://www.tutorialspoint.com/java/java_encapsulation.htm
http://www.interview-questions-java.com/
http://www.janeg.ca/scjp/overload/poly.html


No comments:

Post a Comment