Assignment: #MySet Due: 10/21/02018 Points: 5

Specification

Copy the program MySet.java and implement the methods that have "TBI (To Be Implemented)" in their respective method comment blocks.

A bullet-list of notes.

The output of your program must match the following except for the java.lang.Object@ line. {output file}

205 added (1)
Java supports OOP added (2)
true added (3)
42 added (4)
240 added (5)
42 not added b/c it's a duplicate
foo added (6)
true not added b/c it's a duplicate
foo not added b/c it's a duplicate
Java creator: James Gosling added (7)
240 not added b/c test is full
3.14159265 not added b/c test is full
java.lang.Object@6bc7c054 not added b/c test is full
{205, Java supports OOP, true, 42, 240, foo, Java creator: James Gosling}
...isEmpty(): false; isFull(): true; size(): 7; capacity(): 7
test cleared: {}
...isEmpty(): true; isFull(): false; size(): 0; capacity(): 7

=========================
A: {5, 7, 3, 2}
B: {2, 6}
C: {1, 2, 5}
D: {3, 7, 2, 5}
E: {5, 2, 1}
F: {7, 5}
G: {0, 6, 1, 4}
{5, 7, 3, 2}.equals({2, 6}) is false
{1, 2, 5}.equals({3, 7, 2, 5}) is false
{1, 2, 5}.equals({5, 2, 1}) is true
{5, 7, 3, 2}.union({2, 6}): {5, 7, 3, 2, 6}
{5, 7, 3, 2}.union({5, 7, 3, 2}): {5, 7, 3, 2}
{5, 7, 3, 2}.union({0, 6, 1, 4}): {5, 7, 3, 2, 0, 6, 1, 4}
{5, 7, 3, 2}.intersection({2, 6}): {2}
{5, 7, 3, 2}.difference({2, 6}): {5, 7, 3}
{2, 6}.difference({5, 7, 3, 2}): {6}
{1, 2, 5}.union({3, 7, 2, 5}): {1, 2, 5, 3, 7}
{1, 2, 5}.intersection({3, 7, 2, 5}): {2, 5}
{1, 2, 5}.difference({3, 7, 2, 5}): {1}
{3, 7, 2, 5}.difference({1, 2, 5}): {3, 7}
{1, 2, 5}.difference({5, 2, 1}): {}
{5, 7, 3, 2}.union({5, 7, 3, 2}): {5, 7, 3, 2}
{5, 7, 3, 2}.intersection({5, 7, 3, 2}): {5, 7, 3, 2}
{5, 7, 3, 2}.difference({5, 7, 3, 2}): {}
{7, 5}.subset({5, 7, 3, 2}): true
{7, 5}.subset({1, 2, 5}): false
{7, 5}.subset({3, 7, 2, 5}): true
{7, 5}.subset({7, 5}): true
{3, 7, 2, 5}.subset({7, 5}): false
{5, 7, 3, 2}.remove(7): {5, 3, 2}
{}.union({}): {}
{}.intersection({}): {}
{}.difference({}): {}
{}.union({5, 3, 2}): {5, 3, 2}
{}.intersection({5, 3, 2}): {}
{}.difference({5, 3, 2}): {}
{5, 3, 2}.union({}): {5, 3, 2}
{5, 3, 2}.intersection({}): {}
{5, 3, 2}.difference({}): {5, 3, 2}