Question: JAVA DUE DATE: March 4, 2021 (before 3 PM) Description: Implement the ADT Set using linked data as specified in section 1.21 of your text.

JAVA

JAVA DUE DATE: March 4, 2021 (before 3 PM) Description: Implement theADT Set using linked data as specified in section 1.21 of your

DUE DATE: March 4, 2021 (before 3 PM) Description: Implement the ADT Set using linked data as specified in section 1.21 of your text. The following additional operations are to be defined in the SetInterface: 1. subset(SetInterface): returns true if every element in set A is in set B, false otherwise. A.subset(B) 2. equals(SetInterface): returns true if both sets contain the same elements where order in either set does not count. A.equals(B) 3. union(SetInterface): if A, B, C are sets, has the form C = A.union(B). Union returns a set that contains all the elements in set A and B, but only list duplicates once. 4. toString(): returns a string that indicates an object's state. An object's state is the data that is stored in the object's fields at any giving moment. Format: {1,2,3} {} {1} Remember from your CS1300 that the empty set is a set and the empty set is a subset of every set. If A={1, 3, 5, 7}, B={3,4,5), D= {}, then if C=A.union(B): then C={1, 3, 4, 5, 7); D.subset(A) returns true; D.subset(B) returns true; D.subset(C) returns true and; D.subset(D) also returns true. 1. You must implement the generic LinkedSet class using an inner Node class. 2. Your generic SetInterface must be documented for Javadoc. 3. You must include a SetTest with a main to test your Set ADT. Remember that when you test subset, union, and intersection, test each method with at least the following five cases: Case 1: A and B are equal but distinct sets, for example, A = {1, 2, 3}, B = {2, 1, 3} Case 2: A and B are such that they have different sizes, but one is a subset of the other, for example, A = {1}, B = {1, 2} Case 3: A and B are non-empty and different in size but have common elements, for example, A = {1, 2, 3}, B = {2,3,4,5) Case 4: they are non-empty with nothing in common, for example, A = {1}, B = {2, 3), and Case 5: one is non-empty and the other empty. 4. You need to make sure that you have thoroughly tested every method of your set class. For the test program, you can hard-code all the special cases. Project report: (PDF format) Page 1: Cover page with your name, class, project, and due date Page 2 to 3: o Section 1 (Project specification): Your ADT description. Description of data structures used and a description of how you implement the ADT. Section 2 (Testing methodology): Description of how you test your ADT, refer to your testing output. Explain why your test cases are rigorous and complete. Demonstrate that you test each method. o Section 3 (Lessons learned): Any other information you wish to include. Required I/O: Set ADT by F. Last ...your program I/O Turn in: 1. Project report submitted via Blackboard. 2. There should be 3 Java source files: SetInterface.java, LinkedSet.java, and SetTest.java. Compress these files into a single zip file and submit it with the following name: DUE DATE: March 4, 2021 (before 3 PM) Description: Implement the ADT Set using linked data as specified in section 1.21 of your text. The following additional operations are to be defined in the SetInterface: 1. subset(SetInterface): returns true if every element in set A is in set B, false otherwise. A.subset(B) 2. equals(SetInterface): returns true if both sets contain the same elements where order in either set does not count. A.equals(B) 3. union(SetInterface): if A, B, C are sets, has the form C = A.union(B). Union returns a set that contains all the elements in set A and B, but only list duplicates once. 4. toString(): returns a string that indicates an object's state. An object's state is the data that is stored in the object's fields at any giving moment. Format: {1,2,3} {} {1} Remember from your CS1300 that the empty set is a set and the empty set is a subset of every set. If A={1, 3, 5, 7}, B={3,4,5), D= {}, then if C=A.union(B): then C={1, 3, 4, 5, 7); D.subset(A) returns true; D.subset(B) returns true; D.subset(C) returns true and; D.subset(D) also returns true. 1. You must implement the generic LinkedSet class using an inner Node class. 2. Your generic SetInterface must be documented for Javadoc. 3. You must include a SetTest with a main to test your Set ADT. Remember that when you test subset, union, and intersection, test each method with at least the following five cases: Case 1: A and B are equal but distinct sets, for example, A = {1, 2, 3}, B = {2, 1, 3} Case 2: A and B are such that they have different sizes, but one is a subset of the other, for example, A = {1}, B = {1, 2} Case 3: A and B are non-empty and different in size but have common elements, for example, A = {1, 2, 3}, B = {2,3,4,5) Case 4: they are non-empty with nothing in common, for example, A = {1}, B = {2, 3), and Case 5: one is non-empty and the other empty. 4. You need to make sure that you have thoroughly tested every method of your set class. For the test program, you can hard-code all the special cases. Project report: (PDF format) Page 1: Cover page with your name, class, project, and due date Page 2 to 3: o Section 1 (Project specification): Your ADT description. Description of data structures used and a description of how you implement the ADT. Section 2 (Testing methodology): Description of how you test your ADT, refer to your testing output. Explain why your test cases are rigorous and complete. Demonstrate that you test each method. o Section 3 (Lessons learned): Any other information you wish to include. Required I/O: Set ADT by F. Last ...your program I/O Turn in: 1. Project report submitted via Blackboard. 2. There should be 3 Java source files: SetInterface.java, LinkedSet.java, and SetTest.java. Compress these files into a single zip file and submit it with the following name

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!