Question: Write a Histogram program in Java. Please write it somewhat simple and not too complex. Write a Java program called Histogram.java that displays a list
Write a Histogram program in Java. Please write it somewhat simple and not too complex.


Write a Java program called Histogram.java that displays a list of distinct characters in arn input file and the occurrence of each character. Your program should read an input file name from a user. After that, your program should read characters in the file and display a list of distinct characters and their occurrences. Finally, your program should draw a vertical bar for the occurrences In the assignment, you can assume that the number of characters in the input file is less than 200. You can also assume that each line has only one character and there's no extra blank space after each character. Furthermore, you can assume that all characters are capitals from 'A' to 'K'. A sample run of your program MUST be like below: Input filename: C:\\tmp\\t1.txt Char Occurrence | No D E F GH I J K A C B For the sample run, t1.txt has the following context: For the assignment, your program has to display the result exactly as the sample run. For instance, when you display a list of character occurrences, your program should display the characters with more
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
