hello guyz,,i have confusion anyway,,
i have a textfiles (products.txt & cart.txt):
"products.txt"
inside this text file is
Alcohol $12.7 12
Shirt $45.00 34
if i run it to a java file it would be like this
actually i already know how to read the file,,and when i output it:
Item Price Quantity on hand
1 Alcohol $12.7 12
2 Shirt $45.00 34
if i would like to buy
buy 2(prodNum) 10(qty)
then after the conversation,,it would be like this..
add Shirt to cart
then my cart.txt will be like this:
"cart.txt"
Shirt 45 10
then the quantity on hand in the "products.txt" will be deducted and would result into new:
"products.txt"
inside this text file is
Alcohol $12.7 12
Shirt $45.00 24 (34-10,,since i purchased 10 shirts,,)
hope you can help me guyz,,thank you ahead...