Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

[Java] Draw UML Class Diagram Based On Given Situation.

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)
[Image: j90qyxk.gif]
Anyone? Just a little checking that's all. Solutions is provided , I din't ask anyone to draw it from scratch.
[Image: j90qyxk.gif]
#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.
[Image: wKo4TU0.gif]
(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.
[Image: j90qyxk.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by lockheadApr 22, 2021 07:10 AM 0 147 Apr 22, 2021 07:10 AM
Last Post: lockhead
[Python] by simmerFeb 12, 2021 12:07 AM 0 103 Feb 12, 2021 12:07 AM
Last Post: simmer
[Java] by Nemo2478Oct 20, 2019 01:28 AM 9 505 Oct 20, 2019 01:28 AM
Last Post: Aussie