Question: Given this UML diagram, I need help with the second part, the lab2. Your save and load methods must store set information in binary integer

 Given this UML diagram, I need help with the second part,

Given this UML diagram, I need help with the second part, the lab2.

Your save and load methods must store set information in binary integer format (not as text). To develop familiarity with object storage, implement the load and save features using the java.io.ObjectInputStream and java.io.ObjectOutputStream classes, respectively. You will also override the inherited constructor of CS1181Set to include a new check that verifies that the parameter list has no duplicate elements. If duplicate elements exist, throw a custom InvalidDuplicateElements exception. Make good use of the super constructor to inherit existing functionality.

java.util.ArrayList CS1181 Set +C81181 Set (elements: int...) +CS1181 Set (clone: CS1181 Set) +intersection (intersectionSet: CS1181 Set) +union (unionSet: CS 1181 Set) +difference (differenceSet: CS1181 Set) cs1181 SetLab02 +C81181Set Labo2 (elements: int) (exceptions = InvalidDuplicateElements) +save (filename: String) : void +load (filename: String) : void java.util.ArrayList CS1181 Set +C81181 Set (elements: int...) +CS1181 Set (clone: CS1181 Set) +intersection (intersectionSet: CS1181 Set) +union (unionSet: CS 1181 Set) +difference (differenceSet: CS1181 Set) cs1181 SetLab02 +C81181Set Labo2 (elements: int) (exceptions = InvalidDuplicateElements) +save (filename: String) : void +load (filename: String) : void

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!