-
UML diagram
Hi guys.
I hope I picked the right place to ask this.
I have some questions about very long diagram that I have to make. In short lines the task is this:
airplanes and airports.
The airports have these characteristics:
One runway and multiple hangars.
Some of the airports are only military.
The airplanes have these characteristics:
Capacity.
Speed.
Max time for departure.
Time for maintenance in hangars.
Name.
The plains are divided to military and civil planes. The military and civil are divided to cargo and passenger planes.
Passenger planes nave number of seats and the cargo have max capacity.
So far I have this:
ImageShack® - Online Photo and Video Hosting
About the military and civil plane, I think that a flag will do the trick like this:
Code:
if (FLAG==1){
plane=military;
else
plane=civil;
}
etc...
Can you guys help me with the relationships and dependencies and with the operations?
Thanks :)
-
You could use a flag, or you could use inheritance with a base class of airplane. What exactly can't you figure relationships out for?
-
Well I really wanted to ask do I need more classes, and also compositions and associations?
And which operations to use? It should be a class diagram.
-
you should take a look at Aggregation/Composition for the runways and hangars. its the "part of" or "has a" relationship. Its the line with a diamond on the end .
-
Thanks I will think a little more and I'll write again if I need more help.
-
Sorry about the mediocre advice earlier. I had not looked at your uml at the time(was using a phone and I was being lazy)
I a really don't know uml that well, I can understand basic uml diagrams but I don't understand the all the details.
Your diagrams don't look half bad, but how about some methods? What can planes do? What can airports do? Think of other things your classes can do and add them as methods in the uml.
-
No problem. Well, so far I came to this:
ImageShack® - Online Photo and Video Hosting
I know it needs some more work, especially with the methods, but for now it's ok.
-
to me it looks pretty good. However, like I said before I do not have a deep understanding of UML.