Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions