Hello, I would need some help/suggestions for my java project. it has to create object - "skrynka"="closet". Closet has Shelfs("poličky"). There should be for example Users = 3 cups(differenced by color). I need to move cup on shelf and than autocreate new cup on the "start" place. Problem is that I have to save position of cups- where it is- which closet + which shelf is it on. And be able to write sth like User 1 have cups on for eg. closet 1, shelf 3 + closet 1 shelf 4 ... Here is my code up to now, but i dont know how to realize this problem. http://pastebin.com/WjJLvSPg
Libraries needed for java 6 - Click Here
Libraries needed for java 7 - Click Here
Thank you for your time.

In the Cup class, why not have two instance variables for the Closet and Shelf, and update these when the Cup is moved?
In the User class you just need a List of each user's Cups

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.