My question is, how can I implement this?
Exam * ____________ 1 Student
|
|
Mark
I search a lot by the Internet but I didn't find any clear answer about the way that I can implement an association class.
My question is, how can I implement this?
Exam * ____________ 1 Student
|
|
Mark
I search a lot by the Internet but I didn't find any clear answer about the way that I can implement an association class.
Generally, a class that points to two other class instances. It is often used to implement a many-to-many relationship between object types.
In C#:
public class Product
{
public string Name;
}
public class Department
{
public string Name;
}
// An association class
public class ProductDepartment
{
public Product Product;
public Department Department;
}
Please read the following for Many-to-Many relationship. Entity Framework: Duplicate Records in Many-to-Many relationship
Please read the following for (0..1 to Many) https://codereview.stackexchange.com/questions/14077/is-it-proper-tpt-inheritance
As Pigueiras said: 'Could it be this then? Student 1 - * Exam 0...1 - 1 Mark?' then 1-1 relationship does not also need 'a class that points to two other class instances' as harpo said