Question
1) You may NOT use any classes from java.util except java.util.Scanner. In particular, you are NOT allowed to use the Random class, the ArrayList class,
1) You may NOT use any classes from java.util except java.util.Scanner. In particular, you are NOT allowed to use the Random class, the ArrayList class, the Arrays class, etc. If the class you want to use is NOT in the java.lang package (String, Math for example) or if it is not java.util.Scanner then you should not be using it for this assignment.
2) You will need to use Math.random() for all randomization in your code. You will need to figure out how to use the output of this (a double between 0.0 and 1.0; but not including 1.0) to generate the random things you want (do you ask an addition or subtraction question; generating random byte values).
3) You will need to use the String class.
4) You must use a Scanner object for all user input.
(2) Histogram Program Write a program called HistogramProgram that creates an array of 100 randomly-generated byte0 values ranging from 0 to 9. The program should1********* then display a histogram showing (as a string of *2 l*************** characters) the number of times that a certain number was generated. The histogram should look like this (although results will vary each time5 l******* that you run it) 4 (3) Image Program O0000.o.O. Write a program called ImageProgram that creates a 10 x 10 two-dimensional array of 100 o0o. .o00.O randomly-generated booleans. The program should then display an image that is representedO0o. 0oo. .o by the array showing (as a grid of 'O' or'.' characters), where O is shown when the boolean ooo. . .O00 is true and ., is shown otherwise. See here Then, your program should determine and print the longest horizontal sequence of O characters OO.O.O0O. . as well as the longest vertical sequence of O characters by examining the two-dimensional array. Here is some sample output (although | The longest horizontal sequence is results will vary each time that you run it.. and the highlighting was only added for emphasis):The longest vertical sequence is 8 O0O. .OOOO 0000. .OStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started