Hello. Im Developing a lemonade based game and i have a question. How do you pass information through classes is basically it. The first class handles the menus that occur between game days (what inventory do you want to purchse...type question) the second class handles the animation and the processing of the game day information. I have a third class called inventoryItem. This class is created for each inventory item to handle things like the number of that item, ect.
--> inventoryItem Hamburger = new inventoryItem(); //ex
How can I pass the inventoryItem to the second class, make changes to it and then get those change back to the first class and visa versa? (Im a c++ programmer and java is weird to me without the pass by value/reference stuff in c++)
Any help would greatly be aprreciated!