Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

Evaluate tan x dx.

Answered: 1 week ago

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago