Piggyback off of the code StudentList class so that objects from that class can be written to

Question:

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: