Question: code should be written in java The purpose of this assignment is to practice using text files, binary files, and object serialization, for input and

code should be written in java  code should be written in java The purpose of this assignment

The purpose of this assignment is to practice using text files, binary files, and object serialization, for input and output, and the various methods required to do that. Use try-catch blocks to deal with the lOException and ClassNotFoundException. Problem #1 1. Use a PrintWriter object to create a file called marks.txt, containing 20 marks (integers from 1 to 100). Use a random number generator to generate the numbers 2. Read these numbers from the file and write the following to an output file called results.txt: a, the number of A's, B's, C's, D's and F's read in (A b. 80 to 100, B 70 to 79, etc) the highest mark, lowest mark and the average mark DO NOT USE AN ARRAY TO STORE THE NUMBERS c. You can use the following code to get started: PrintWriter outputFile- new PrintWriterl"marks.txt" etc. File inputFile - new File( "marks.txt") Scanner input- new Scanner( inputFile ) PrintWriter outputFile new PrintWriter( "results.txt") while (input.hasNext()) f your code goes here

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!