Finalizing Assignment

Read from System.in and added an output.txt file.