Thank you! Base on all the methods 1-4, I want to write another method: The spec for method 5 A method to print a text-based histogram takes one parameter, an array of integers no return value Image 1 is the example of the expected output  Hint: it bacsically means: for example, if I have number 20 appears one time in my method, then we print a star(*) after number 20. I think we can use this method 4 to get this information.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Thank you!

Base on all the methods 1-4, I want to write another method:

The spec for method 5

A method to print a text-based histogram

  • takes one parameter, an array of integers

  • no return value

Image 1 is the example of the expected output 

Hint: it bacsically means: for example, if I have number 20 appears one time in my method, then we print a star(*) after number 20. I think we can use this method 4 to get this information.

histogram of the data and output some statistics.
input file name? seattle average_temps_2021.txt
01
1|
21
3|
41
51
61
71
81
91
10|
11|
12|
13|
14|
15|
16|
171
18|
19|
201 *
The program begins by pri
Transcribed Image Text:histogram of the data and output some statistics. input file name? seattle average_temps_2021.txt 01 1| 21 3| 41 51 61 71 81 91 10| 11| 12| 13| 14| 15| 16| 171 18| 19| 201 * The program begins by pri
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Thank you base on this question I want to write one more method.

The spec for this method is 

write a method to print out the Mode

for example, in ur program, the highest occurring number is 5 then I will print out "Mode: 5"

 

plz provide a screenshot of your code when it's finished.

Thanks!

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

Thanks!

base one your program, if I don't want to print out the "count of 1: 0"( see image 1), I want the program only print out the histogram, what should I change?

plz provide a screenshot of your code when u done 

 

 

PS C:\Users\tshub\Desktop\New
PS C:\Users\tshub\Desktop\New
The program will analyze data from a dataset of
non-negative integer values. It will produce a
histogram of the data and output some statistics.
input file name?
5
count of 1 : 0
count of 2 : 1
count of 3: 2
count of 4:3
count of 5: 23
Histogram:
1|
2 *
31 **
4 ***
folder> javac FunWithHistograms.java
folder> java FunWithHistograms
seattle_average_temps_2021.txt
*******
don't print out
5 ***
PS C:\Users\tshub\Desktop\New folder> |
Transcribed Image Text:PS C:\Users\tshub\Desktop\New PS C:\Users\tshub\Desktop\New The program will analyze data from a dataset of non-negative integer values. It will produce a histogram of the data and output some statistics. input file name? 5 count of 1 : 0 count of 2 : 1 count of 3: 2 count of 4:3 count of 5: 23 Histogram: 1| 2 * 31 ** 4 *** folder> javac FunWithHistograms.java folder> java FunWithHistograms seattle_average_temps_2021.txt ******* don't print out 5 *** PS C:\Users\tshub\Desktop\New folder> |
Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY