Consider the statement: “A course has several other courses as a prerequisite.” Which one of the following can be said of the type of class association relationship that is present?
a. Unary association
b. Binary unidirectional association
c. Binary bidirectional association
d. Ternary association
Answers
Answer:
From the above given options, several other courses that is being exhibited as a prerequisite by a course is given by option d) Ternary association.
Role played by association's each class is called Ternary association.
For example when you are going to buy something , you are the buyer, and the one selling you the thing is seller.
When some negotiation in price is done by another person , he would be known as agent.
Therefore this type of association between agent , seller and buyer is referred as Ternary association.
Answer:
Binary bidirectional association is the right answer.
Explanation:
As per the given statement, one course can have several other courses. it is one-to-many relationship. “Unary association” is invalid because unary has to have only “1” child. But here we speak about 1 parent can have multiple child.
So Binary “bidirectional” will be a perfect suit because, 1 course can have many child courses and many child courses can have 1 parent. So there is “many to one” relationship also exists.