this is my first post here, and I really need some help with my homework. I'm a newbie to Java programming, and I have this assignment:
Write an application which reads data from a file about certain items (one row - one item, stored are the integer valued code, amount and name of an item) into one of Java's collections (e.g. Vector, ArrayList or LinkedList). After that, user, from standard input, enters item's code (e.g. 253201) and amount he wants, and program updates the amount of that item in collection, and it displays the message to the user with the name of the item he bought. After the end of the program, the updated state is written in the same text file over the old state (the data are overwritten). GUI realization is not needed.
That's what I should do. So practically, the program needs to read from file (data about items, 1 per line which contains 3 data: code, amount and name), puts the read data into a Java collection, user enters the code and amount for one of the items, the data are updated and written over the existing data in the existing file. The user is previously shown what he entered.
How do I do this? Thanks for help! If you need my mail for something, it's firstname.lastname@example.org.