I'm currently having some trouble implementing ternary associations in Code. I get the binary ones, but I am unsure about ternary Associations.
this is typical scenario in a university.
Lecturer can teach a one subject to one or more students
student can teach one subject from only one Lecturer
Lecturer can teach one student to only one subject
There exists a ternary association between these three classes.
Relation among these three classes shown in below UML class diagram and also multiplicities are there
I've read on different sources regarding this all across the internet and coudn't find a solution
How do I implement the association between these three classes ? or, In general What are the possible ways to implement association between classes (in java) ?