Question: Using this chapters ReadObject class as a guide, implement a StudentListFileReader class that reads and displays all objects in the file created in the previous

Using this chapter’s ReadObject class as a guide, implement a StudentListFileReader class that reads and displays all objects in the file created in the previous exercise.

Exercise 16.3:

Piggyback off of the code StudentList class so that objects from that class can be written to a file. Provide an updated StudentList class heading so that the class supports serialization. Using this chapter’s WriteObject class as a guide, implement a StudentListFileWriter class with a main method that does the following.

• Instantiate an output file object where the filename comes from user input.

• Instantiate a StudentList object with student names Caiden, Jordan, Kelsey, Max, Jack, and Shelly.

• Write the StudentList object to the file.

• Call the remove method to remove Kelsey from the StudentList object.

• Call the file’s reset method.

• Append the updated StudentList object to the file.

If you want to test your solution to this exercise, do the next exercise.

Step by Step Solution

3.32 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly First update the StudentList class to support serialization by implementing the Serializable interface import javaioSerializable import java... View full answer

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 Introduction To Programming With Java A Problem Solving Approach Questions!