[enter image description here][1]I am trying to do a java program that reads and edits (add/remove/replace) a specific line in a text file. I was thinking of doing it with a switch-case statement for the choices.. for example:
[1] read file --- this shows the whole content [2] add content --- the user will enter a text and it will save it into the text file [3] replace line --- enters line # and shows the content and the user replaces it [4] remove line --- enters line # and removes the content etc...
is it possible to create a text file and make all of these choices into a single java file? I was also thinking that if i will make this using switch case, i will use methods on each choices to perform its tasks. I'm a bit confused about the flow of this program so it would be helpful if you guys can give me steps or tips in making this? I'm quite a noob at this and I really need help
[1]: https://i.stack.imgur.com/On2S7.png --- i was just starting to do this program and this is my idea