Use user input filename for analysis#85
Conversation
|
This is great! Thanks for explaining it so thoroughly to me - I really appreciate it! Since it is October 1st in your time zone, this would be eligible for Hacktoberfest, correct? |
I suppose it does count, cheers! |
|
@Kit-p I noticed that you write very high-quality code. Do you have any other suggestions/ideas on what can be done to improve the code base? Anything from major to minor changes would be much appreciated! |
|
@Verisimilitude11 Thank you, you keep the project very maintainable. I think your current refactoring strategy should work well for the long run, I would say just keep it up! One thing about user experience though, keep the program running and ask the user to retry may be more user-friendly than quitting with an exception. At some point in the future, a TUI or even GUI should be implemented to really take the project to the next level. |
Asks user to input the path to file for analysis.
@Verisimilitude11
The reason it didn't work before is that you closed the
Scanner. When you close aScanner, it also closes the underlying stream, which in this case isSystem.in, thus any otherScannerwrappingSystem.inwill fail to read subsequent inputs.Out of the 2 approaches (suppress the warning and not close / use a global
Scannerand pass it around), I chose the latter as it is clear thatSystem.inwon't be needed after themain()function, so we can safely close it.Feedback is welcome!
Closes #29.