What I want to do is that if for example I have a list of items that I wanna sell, every item has a String name and int price, and I add them to an array(could be an arrayList I'm not sure what would be better, cause I would like it to be userinput) and say I add many elements to that array like this: [item1, 50, item2, 100, item3, 200] What I want to do is extract one of the items, item1 for example with its price: 50 and sell it for an amount equal to the price or bigger, and then put the item1 that I sold for a 100 into another array of my sold items. I wanna be able to do this with every item. I don't even wanna start coding cause I have no idea how to do it.
Aucun commentaire:
Enregistrer un commentaire