Hey guys,

Sorry if this is in the wrong place, I wasn't sure which area would be best suited!!(feel free to move)..

I am trying to figure out the best way to code using OOP, so-far I have only been doing simple things using one table basically so have not run into this problem before so now that I'm using multiple tables and "joining" objects etc I'm getting a bit confused...

I have been "taught" to do OOP programming in a way where I have 3 'layers', 1st layer would be the class of an object, 2nd is the Database Access Object (DAO) which controls the database logic, and the 3rd being a "controller" which basically wraps any business logic etc

So, for example - I have a student class (with methods like getStudentNumber, getName, setName .... etc), the DAO does the actuall database SELECT, UPDATE, INSERT operations and the Controller wraps these simple db instructions into something useful, like recordLogin(which would use the DAO to check a user exists and retrieve the student object before updating the database using the DAO to record a sucessful login etc)

My problem is scenarios such as "producing a class list of students involved within a module"...

So, I have a Module class and a Student class(and the stuff in-between to update them etc), but how do I programe something like this class-list?
I'm thinking of having a "StudentModule" class which contains a Module object and an arrayList of Students involved in that module - is this right? or should I be doing this completly differently etc?

Sorry for the long description and hope I haven't confused things more!..

Any help would be great,
Thanks, Chris