Retail sales assignment

Posted 05 April 2013 - 07:21 PM

Hi,

I'm new to programming as well as this forum. I was recently given an assignment to create a retail sales program which allows the user to shop, add items to their cart and have the items totaled upon check out. The instructor wants us to use several classes to create new objects for the cart, store, ect. I'm having a very difficult time tying everything together at the end. Here are the classes I have so far. She wants the main method written exactly as is which leads me to believe I should try to work bring everything together in the Store Class. Everything compiles so far and is kept together in one project. Attached is the problem statement. Thanks!

Replies To: Retail sales assignment

Re: Retail sales assignment

In the Store class, your methods are too complicated. Break them up into smaller, simpler pieces using other methods and/or shifting some of the burden to the partner classes.

Consider loading the store's inventory, the Item objects, into a collection of Items like an ArrayList. Then you can create methods that accept an argument collection of Items to create the shopping menu. Do something similar for the customer's shopping cart to show the items in the cart and the total cost of the items.

Beyond that, you need to explain the statement, "I'm having a very difficult time tying everything together at the end," so we know how to help. Not sure what difficulty you're having.