Question:
How are Objects, Classes, Encapsulation, Inheritance represented in a UML diagram?
Peggie
2010-04-13 09:56:26 UTC
This is for object oriented programming. I've looked everywhere for 5 hours! I'm really frustrated, I'm not even sure if its asking me to make a UML diagram for each concept or an overall UML diagram showing every concept in a sample problem. Help please.
Three answers:
Philip Augustus
2010-04-13 10:02:01 UTC
uml can do all this.



objects are instances of classes.

so you would not do both together



For documentation you would have classes as shapes.

Encapsulation can have variables inside of a shape. Such as a box named Class1. Then inside put var1, var2,...



Inheritance can be shown with arrows. such as a box for car. then arrows pointing to lexus, toyota, honda,....
Superman
2010-04-13 10:09:28 UTC
UML diagrams are like case diagrams, which

gives you a better understanding to summarize

who uses your application or system, and what

they can do with it. Each of it does require you to

follow the proper convention of defining them.



Like for example in Classes Scenario:

The Classes shows a static view of the classes in

a model. The attributes and operations of classes

are along with various different kinds of relationship

that binds the classes together. They can be like

for example, the towns or cities with the relationships

being the routes between those places.
mico
2010-04-13 10:14:35 UTC
It doesn't sound like it's asking you to make a diagram at all. I would describe in general terms how each are visually represented and visually relate to one another.



Something like

The UML representation of a class is a rectangle containing three compartments stacked vertically....


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...