Hack Forums
[Java] [Java] Draw UML Class Diagram Based On Given Situation. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Java] [Java] Draw UML Class Diagram Based On Given Situation. (/showthread.php?tid=5880953)



[Java] Draw UML Class Diagram Based On Given Situation. - Money- - Sep 3, 2018

I have already drew them myself. These exercises has no solutions.
So I'm unable to verify if I'm correct or not.



Let me know if these solutions have the correct relationship and class based on the questions.
You could just use paint highlight and show where I'm wrong that'll be appreciated if I have errors in my design.



#Q1

Spoiler (Click to View)

#Solution

Spoiler (Click to View)




#Q2

Spoiler (Click to View)

#Solution

Spoiler (Click to View)




#Q3

Spoiler (Click to View)

#Solution

Spoiler (Click to View)




#Q4

Spoiler (Click to View)

#Solution

Spoiler (Click to View)


RE: [Java] Draw UML Class Diagram Based On Given Situation. - Money- - Sep 6, 2018

Anyone? Just a little checking that's all. Solutions is provided , I din't ask anyone to draw it from scratch.


RE: [Java] Draw UML Class Diagram Based On Given Situation. - BottomNotch - Sep 6, 2018

#1 and #2 are right. I believe you left out 'duration' in #1 tho. Also typo 'rental : Renta' in #2.

Overlooked #3, but in #4, for a second I thought icNo was the same and was wondering why it was in both student and teacher rather than human, but I just realized they're both different. I would make it studentIcNo and teacherIcNo cuz rn there is no difference.


RE: [Java] Draw UML Class Diagram Based On Given Situation. - Money- - Sep 7, 2018

(Sep 6, 2018 08:39 PM)BottomNotch Wrote:  #1 and #2 are right. I believe you left out 'duration' in #1 tho. Also typo 'rental : Renta' in #2.

Overlooked #3, but in #4, for a second I thought icNo was the same and was wondering why it was in both student and teacher rather than human, but I just realized they're both different. I would make it studentIcNo and teacherIcNo cuz rn there is no difference.

Thank you for pointing out the errors. Yeah for Q4 they are both different , should have named both studentICNo and teacherICNo instead of icNo.
If I were to name it icNo could have put it in the Human Superclass instead of the subclasses.