Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+7 votes

I want to understand when we are supposed to use a solid line and a dash line. If there are any other type of lines as well.

asked in CSC 305 Fall 2024 by (1.1k points)
+1

I just looked up some different websites and readings that explained it in a different way and I think that it makes a lot more sense now. Ill attach the two websites that I have looked at so far.

https://www.umlboard.com/docs/relations/

https://creately.com/guides/class-diagram-relationships/

2 Answers

+6 votes

Hmm... I think the first step would be to read the assigned UML reading that was on Moodle.

ASSIGNED READING: UML class diagrams (by Dale Skrien)

If you still have questions about the lines/arrows after reading it, let us know!

answered by (3.4k points)
+5 votes

You would use a solid line with an "empty" arrowhead for a subclass.
You would use a dashed line with an "empty" arrowhead when you are implementing an interface.
The other time you would use a dashed line is if one class is dependent on the other (changes to the second class require changes to the first). In that case, you want to use a dashed line with a primitive arrow (just the V shape, not a triangle). Only include a dependency line if there is not already an associative line between the two classes.

answered by (2.9k points)
...