• Post Reply Bookmark Topic Watch Topic
  • New Topic

i need help on my shopping cart assignment  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i realy need help on my assignment... can i have some your ideas on how to do this one...i've been studying java for just two week and this is the first my first assignment.

Display a list of products available for purchase.
• The list of products is stored in a text file which is accessed by the system.
• System should show the product name, number of products available, and the price of the product.
• The products list should be numbered starting from 1 to allow customers to select the product they want to purchase.
• Should there be no products available for purchase, inform the customer and exit the application.


Display a list of products that are currently inside the shopping cart.
• The shopping cart is stored in a text file which is accessed by the system.
• The list displayed should be of the same format as that displayed by list of products.
• A grand total should be displayed at the end of the list, showing the amount the customer must pay for all the products bought.
• Should the shopping cart be empty, inform the customer that the shopping cart is empty.


Allow user to buy a product.
• Accept a product number and quantity.
• Validate user input.
• Do not allow customer to buy products that do not exist.
• Do not allow customer to buy more products than that being sold.
• Do not allow customer to buy products with negative quantity.
 
Bartender
Posts: 612
7
Mac OS X Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well how you do this is that you take a paper and pencil and write down how you would do this……

Then you rewrite it, and rewrite it until you can hand it to a 10yr old and they could do it.


then and only then, you figure out the smallest part of that you can write and verify it correct - then implement that.

then find the next smallest thing you can implement and verity correctness - then implement that

redo above line until project is done. :-)

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!