Hi,
U should have an abstract class which implements basic functionality like add, delete, update db operations, from this u have to inherit Student Class. Now student class will get the methods of the base(abstract) class this is useful to add, delete or update student information to the database, in the same manner u have to inherit Course class from the Abstract class using this class u can add or delete or modify the courses.
I think then u should a table which links student with the courses. For this Form the requirements are may be like to get the Student & course List from the respective table.
U should have the method in the Student class some thing like GetAllStudents() which will give u the names of the students, in the same way u should also have method to retrieve the Course List this method will be in Course class viz., GetCourseList().
Ur third table is one which links Student & there courses for this u should maintain one class which is used to interact with the database.
Suppose if u r maintaing a form to link Student and Course to get the list of students u have to create an object of type student to get the list of students. In the same way u have to do for Course list also.
If u want i can mail u a sample provided u have to give me the db structure & how u want the user interface, Mail id muthymys@yahoo.com
Good Luck,
M R N Murthy
Main Topics
Browse All Topics





by: vgruPosted on 2001-03-02 at 01:24:46ID: 5893865
set up a 3 tier system. That is put your Student and course classes in the business model dll and save your data in a database which speaks with a database dll.
Application model - Business Model - Database Model
(student class) (db connection)
(course class)
The Application and Business models should never connected directly with the database.