Hi,
I am working on a Java assignment of developing a University diploma program as follows:
uni-diploma (one-to-many)
diploma-module(one-many)
module-lectures(one-many)
lecture-student(many-many)
class uni contains
TreeSet diploma
all set and get methods for adding each new diploma in the set and association to class diploma.
class diploma contains
TreeMap module
all set and get methods for inserting each module into the map module and the
class module contains
ArrayList lecture
all set and get methods
class lecture contains
ArrayList student
association to class student and the set and get methods.
class student contains
ArrayList studies and association to class lecture etc
I also have a driver class to run the JOptionPane interface.
My program is working in the sense I am accordingly able to create a new diploma then a new module ..a new lecture and assign a student objects etc.
The problem is with not being able to save the instances.
I mean once I assign a student to a lecture, if i go back to create another lets say lecture, i loose the previous one!!hehe
I know this is by design of my program. The problem is I do not know what I need to do to get over this without changing my basic design. Please help this novice. !!