I'm a beginner in programming world...
Currently, I coding a simple food ordering simulation.
It is something like this:-
Qty:1 Foodname:Fried rice
Qty:1 Foodname:Noodle
Qty:1 Foodname:Fried rice
Just wanna ask, is there anyway to make the order list become:-
Qty:2 Foodname:Fried rice
Qty:1 Foodname:Noodle
Which mean everything I key in a new food it will trace the list. If the food is exist, then the quantity will increase by 1.