Question: Please name your class file as HW 9 . For submission in Gradescope, please include the packages given below before you submit your code or

Please name your class file as HW9.
For submission in Gradescope, please include the packages given below before you
submit your code or your code wont compile.
package homework;
import java.util.Scanner;
import brandon.math.Math;
import brandon.math.Random;
public class HW9{
// Main method
//Please write your code here
}Write a program to create a file named hw9.txt if the file does not exist (If the file exists, terminate
your program without doing anything.) Write ten integers ranging [0,99] created randomly into
the file using text I/O. Integers are separated as shown in the output below. Read the data back
from the file and display them on the console.In the same program, create a file named hw9_scale.txt if it does not exist (If the file exists,
terminate your program without doing anything.). Multiply all the numbers from hw9.txt by 10
and save all the new numbers in hw9_scale.txt. For example, if hw9.txt is
26
12
4
89
54
65
12
65
74
3
Then hw9_scale.txt should be:
260
120
40
890
540
650
120
650
740
30
Be sure that your source code compile and execute successfully. Note: Your output should be formatted exactly like the output given at the beginning
of this assignment and should be able to run/compile.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!