Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions 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
expand button
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
Check Mark
Still need help?
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
by 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> |
expand button
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
by Bartleby Expert
SEE SOLUTION
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
by 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> |
expand button
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
by Bartleby Expert
SEE SOLUTION
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY