Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a program named CharDistribution.java, within this program, implements methods as specified below: public int[] charCounting(String str) - this method counts number of times each

Design a program named CharDistribution.java, within this program, implements methods as specified below: public int[] charCounting(String str) - this method counts number of times each of alphabetic characters appears in the string. The first element of the int array represents the frequency of A, the 2nd is for B, and so on. public int[] charCounting(File file) - which counts how many times each of the alphabetic characters appears in the data file. public void print(int[] c) -print the int array in a histogram format. Note: The overloaded charCounting methods do not differentiate the difference between lower and upper cases. Then print the result as a histogram as specified as follows: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ---------------------------------------------------- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z How to run testing cases: Click on the CharDistributionJUnit.class file, then click on the Run JUnit button To examine the histogram output, click on the CharDistribtionT.class to select the file, then type *data1.txt in the Cmd argument list then click on the Run button 

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

Students also viewed these Databases questions

Question

8 1 point Simplify 49xy4. +7zy 24.5. |x| y O7|2|y2 Oxy

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago