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 HW
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 HW
Main method
Please write your code here
Write a program to create a file named hwtxt if the file does not exist If the file exists, terminate
your program without doing anything. Write ten integers ranging created randomly into
the file using text IO 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 hwscale.txt if it does not exist If the file exists,
terminate your program without doing anything. Multiply all the numbers from hwtxt by
and save all the new numbers in hwscale.txt For example, if hwtxt is
Then hwscale.txt should be:
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 runcompile
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
