-4

I would know It is possible in java language to write function. How to check the links between each class in java ? For example School |1 ----- 1..*| Student

Thanks for advance.

MJason
  • 3
  • 4

2 Answers2

1

One-to-many relationships in Java is typically implemented as a List property:

class School {
    private List <Student> students;
    ...

So to know how many students does your school have you call students.size().

I hope I understood your question correctly.

maksimov
  • 5,792
  • 1
  • 30
  • 38
0

I am not sure if i understant you correctly. But! if you are looking for a way to create UML diagrams I can recomend you ObjectAId plugin for eclipse. Very easy to install and use.

k4sia
  • 414
  • 1
  • 6
  • 18
  • Thank for the answer. But i would know if i write function which check the links between each class. For example In my class School i have this checkLink function i execut. I have one message with "School |1 ----- 1..*| Student" I don't know if you understand what i want. – MJason Oct 11 '13 at 13:32