I agree norm, a map would help but you would need two of them. One for quantity and one for total cost. And again i warn of using things your teacher doesnt allow. Many assignments are done to teach...
Type: Posts; User: Chris.Brown.SPE
I agree norm, a map would help but you would need two of them. One for quantity and one for total cost. And again i warn of using things your teacher doesnt allow. Many assignments are done to teach...
Aha, i see. It is in the list twice. I guess the problem here is that you have two different Jaguar objects which makes sense. What would really help me out would be to show me what you would expect...
Your System.out.println is in the loop. Is this intended?
Well i'm not going to code it for you but i'll help you through it.
Start by adding the inventory amount as an attribute in your Product class and give it some getters and setters so you can...
This looks like the perfect opportunity for a Map. Maps relate one object to another. For instance you could use a HashMap<String,Product> to relate the name of the car to the car object. Read up on...