Question
you will be creating a driver class only for this assignment, however, you need to submit the driver class and both the input and output
you will be creating a driver class only for this assignment, however, you need to submit the driver class and both the input and output files.
Be sure to include a message to the user explaining the purpose of the program before any other printing to the screen.
Within the main method, please complete the following tasks:
Use a loop to create a file named input.txt that contains 10 randomly generated numbers between 0 and 99, one per line. Be sure to close the file when done and print a message to the screen indicating the input file has been created.
Create an output file named output.txt. Create a header row similar to the following in the file:
Number 1x 2x 3x 4x 5x 6x 7x 8x 9x 10x
Using a second loop, read in the numbers from the input file one at a time (use the hasNext() method). After reading in each number, calculate and write/print the first 10 multiples of the value read in separated by a tab to the output file.
Close file output file when all the values in the input file have been processed.
Print a message to the user indicating that the output files has been created.
Include clear comments throughout the program that explain the functionality the various lines/small sections of code are completing as related to the execution of the program.
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