Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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