1. Back To Blog

.NET interview questions: - Explain object diagrams in UML?

One of the most expected .NET interview questions on Unified Modeling Language (UML) asked to software engineer during .NET interview.

 

Class represents shows the static nature of the system. Class diagrams shows the types and how they are linked. 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. Below figure ‘Object diagram' shows how a class looks in when actual objects are created. We have shown a simple student and course relationship in the object diagram. So a student can take multiple courses. The class diagram shows the same with the multiplicity relationship. We have also shown how the class diagram then looks when the objects are created using the object diagram. We represent object with Object Name: Class Name. For instance in the below figure we have shown ‘Shiv : ClsStudent' i.e ‘Shiv' is the object and ‘ClsStudent' the class. As the objects are created we also need to show data of the properties, the same is represented by ‘PropertyName=Value' i.e. ‘StudentName=Shiv'.

 

net

Figure: - Object diagrams

 

The diagram also states that ‘ClsStudent' can apply for many courses. The same is represented in object diagram by showing two objects one of the ‘Computer' and the other of ‘English'.

 

Also see the following video on Object diagram in UML as follows: -

 

Learn more on  important .NET interview questions Regards,

 

From more on author's blog related to Dotnet interview questions and answers   click and visit

Shiv Prasad Koirala

Visit us @ www.questpond.com or call us at 022-66752917... read more

We are on Social