Creating An Object From A Text File and Then Adding on to it.
Okay, I am trying to figure read a list from a text file, and then add what was read to an object.
Then I need to prompt the user if he/she wants add on to the list. If they hit yes, then it should make an array that will somehow add on to the object.
Lastly, I need it all printed to the console, which I don't even know if I can print an object.
here is my code
Main - http://pastebin.com/EEhkfMfA
ToDoItem - http://pastebin.com/mFPzpiG9
ToDoList - http://pastebin.com/EzKFc3UN
It is the ToDoList class where I am completely lost. My instructor said I should use the getItems method to retrieve the current list from the text file. But I have no idea how to turn it into an object. Then my getAddItems method is a another story...I attempted to add an array to the object which I hope I created correctly. I am pretty sure I did the ToDoItem class correctly, the id is supposed to number the list. With the description being self-explanatory.
I apologize if the code is sloppy, but I am completely lost and spent way to much time than I should have on this. I would appreciate if anyone could guide me through some of this.
Posted Jul 31, 2015, 11:35 PM UTC