Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started