How to implement One-to-One and One-to-Many class associations using VB.NET 2005?

95 pts.
Tags:
class associations
Data modeling
Object-oriented programming
One-to-Many Relationships
One-to-One Relationships
VB.NET 2005
VB.NET classes
I have designed a solutions for a Student and Employee Management system using Object Oriented concepts and techniques. I'm doing this management system as a Graduate Project. Now I'm stuck in implementing the association relationships. Can anyone help me on this. Answers using code examples would be great. Thanks, From Lahiru.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You might want to show us what you have done so far (class definitions, etc…), and provide more detail about the relations you want to implement, so we can provide more specific help.

Are you going to use databases ? how and where are you going to save system data ? are you talking about class relations or database tables relations ?

Regards,

Sorry to write in this answer box. I don’t know how to edit my question. Here’s a simple readme file I’ve created about my current system design. http://rapidshare.com/files/206049884/Readme.doc.html. Please help!!!

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    I think it was not a good idea to upload your document to rapidshare. I downloaded the document, but it is still unclear to me what is what you need help with (i.e. what you mean by 'the association relationships'). In databases there is the 'foreign key' concept. You use foreign keys to define relations between tables, but that is a database concept and it doesn't exist in OOP. You would need to programm those constraint validations. On the other hand, I don't see where you could need such constraints in your design, since you have classes for students, courses and employees, being each independant of the others. Structures to relate the above classes are missing, for example, a new class to store student-course relations.
    69,065 pointsBadges:
    report
  • Obhasha07
    Well, I haven't got any other choice than uploading the doc to rapidshare. In object oriented design, a relationship between two objects is called an association(According to what I've learned from books). In UML it's represented as a single line connecting the two classes/objects. Well, I've designed the basic structure and I need to know how to implement what I've designed. I'm sorry for my incomplete design document. I have already designed intermediate classes (such as to store student-course relationships). I have already coded the classes independently and all I need to know is how to implement the relationships between them. I need to get the same diagram I've designed in Visual Studio's class diagramming tool. Currently I can get the interface implementation relationships correctly.
    95 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following