Z
ZyLo
Hello. I guess I'm not a relative newcomer to Java, but it has been
too long that I did any actual programming and not just design work
that I'm stumping myself on what I think should be a relatively simple
problem.
I have a class that has a list of objects in it. I want to make an
association class separate from this class that uses specific objects
in that classes' lists to define an association. For instance:
I am considering a scheduling problem. I have lists of various object
types: people, timeslots, room assignments, classes etc. I have a plan
to make an association class, conflicts.java, that would contain an
association of pointers to the items in these lists that are
conflicting.
If a person is scheduled back-to-back for the same class, that would be
a conflict with the person and the room and timeslots, all of which are
objects in separate lists. Also, a conflict might be that the person's
maximum hour load is reached, and the relationship is that this person
is in conflict with it's own boundaries of hours. I don't want to
simply deny that the users who use this program not be allowed to
create conflicts, but rather, use this association class to 'mark' the
conflicts that are created, until they are later fixed by the user at
his/her discretion.
How can I do this? I was thinking that simply creating pointers to the
other classes' lists would be fine, but 1) I'm not experienced with
Java and dont' remember/know how to do that and 2) I am not certain on
what "every object in Java is a pointer" really means, especially in
this context. Can someone help me out on this?
Thank you.
too long that I did any actual programming and not just design work
that I'm stumping myself on what I think should be a relatively simple
problem.
I have a class that has a list of objects in it. I want to make an
association class separate from this class that uses specific objects
in that classes' lists to define an association. For instance:
I am considering a scheduling problem. I have lists of various object
types: people, timeslots, room assignments, classes etc. I have a plan
to make an association class, conflicts.java, that would contain an
association of pointers to the items in these lists that are
conflicting.
If a person is scheduled back-to-back for the same class, that would be
a conflict with the person and the room and timeslots, all of which are
objects in separate lists. Also, a conflict might be that the person's
maximum hour load is reached, and the relationship is that this person
is in conflict with it's own boundaries of hours. I don't want to
simply deny that the users who use this program not be allowed to
create conflicts, but rather, use this association class to 'mark' the
conflicts that are created, until they are later fixed by the user at
his/her discretion.
How can I do this? I was thinking that simply creating pointers to the
other classes' lists would be fine, but 1) I'm not experienced with
Java and dont' remember/know how to do that and 2) I am not certain on
what "every object in Java is a pointer" really means, especially in
this context. Can someone help me out on this?
Thank you.