Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions