[Solved] Lab 13 Java Programming

$25

File Name: Lab_13_Java_Programming.zip
File Size: 216.66 KB

SKU: [Solved] Lab 13 Java Programming Category: Tag:
5/5 - (1 vote)

1. Declare and implement a class named Histogram. This class will have a string data member and the following methods:

Data members:

String text

Methods:

constructor initialize text with I love problem-solving..

setText(String t) set text to t.

drawHistogram() count each alphabet letter, store the counts in an array and plot the counts using a vertical histogram. As an example, if text = I love problem-solving., this method should plot:

* *

* * * * *

* * * * * * * * * * * *

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

Note that all special characters including blanks are ignored and alphabet letters are case-insensitive.

Your main program should use the following menu:

T: Enter a text

P: Plot frequencies

Q: Quit

Select:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Lab 13 Java Programming
$25