Histogram JAVA Programming Assignment Help

Histogram JAVA Programming Assignment Help

Histogram JAVA Programming Assignment Help


The main objective of this Histogram JAVA Programming Assignment Help is to design and construct Graphical User Interfaces for the specified problem domain. I have used JavaBeans software element and implemented the Java inheritancefeatures as well. I have made both the programs as per assignment requirements.

Program 1 (TextBased)

The program that is to be made accepts one command line argument, which is the filename of the text to be read.
The example will be: java histogram <filename>where <filename> is the name of the input text file. The program then reads this file and calculates the histogram of each letter and displays the histogram in the following order:

  • The total number of characters counted (only include AZ)
  • The letters in upper case
  • The occurrence of the letters and the percentage?
  • It shows a series of asterisks showing the percentage of each occurrence
  • The program outputs a vertical bar for every 10 asterisks

Here is the UML diagram made for the above text based Java programing that explains the methods and variable used in the program.

Histogram JAVA Programming Assignment Help

Here is the code for the above text based program requirements.

text based program

The output screen of the programaccepts the filename as the parameter.

Figure 2command line

Figure 3program output

Program 2 (GUIBased)

Write a program that displays the histogram using a GUI. The file name is entered from a text field. Pressing the Enter key on the text field or clicking on the view button causes the program to start to read and process the file and display the histogram. The histogram is displayed in the center of the window (see Figure 1). Note that you do not have to display the count or the percentage.
Here is the UML diagram for the GUI based program which will display the histogram.

Figure 4 UML

Below is the implemented code for the GUI based program:

Figure 5 code

Figure 6 program output


While working on this assignment I got the knowledge of basic concepts of java and software elements such as NetBeans. My skills have been improved and I have become confident to work more on such projects. I have understood the concept of writing test cases using JUNIT.


[1]"Coursera - Free Online Courses From Top Universities", Coursera, 2016. [Online]. Available: https://www.coursera.org/learn/java-programming. [Accessed: 15- Apr- 2016].
[2]"Features of Java | Core Java Tutorial | Studytonight", Studytonight.com, 2016. [Online]. Available: http://www.studytonight.com/java/features-of-java.php. [Accessed: 15- Apr- 2016].
[3]"Java characteristics & features - Java Tutorials - c4learn.com", Learn computer Programming Language Step By Step, 2012. [Online]. Available: http://www.c4learn.com/java/java-characteristics-features/. [Accessed: 15- Apr- 2016].
[4]"JUnit Test Framework", www.tutorialspoint.com, 2016. [Online]. Available: http://www.tutorialspoint.com/junit/junit_test_framework.htm. [Accessed: 14- Apr- 2016].
[5]B. Start and M. Thesiya, "Multithreading in java with examples", beginnersbook.com, 2013. [Online]. Available: http://beginnersbook.com/2013/03/multithreading-in-java/. [Accessed: 18- Apr- 2016].