CSE 241/505 Homework # 8 Inheritance and Generics in Java solved

Original price was: $35.00.Current price is: $35.00. $21.00

Category: You will receive a download link of the .ZIP file upon Payment


5/5 - (1 vote)

In this homework, you will write a generic Java class hierarchy for a simple container class hierarchy.
The class GTUContainer is an abstract class with the following abstract methods.
Test whether container is empty
Return container size
Return maximum size
Insert element, throws exception java.lang.IllegalArgumentException if there is a problem with
Erase element
Clear all content
Return iterator to beginning
contains(Object o)
Returns true if this collection contains the specified element.
The class GTUSet extends from the super class and implements all of the methods appropriately
for a set class.
The class GTUVector derives from the base class and implements all of the functions
appropriately for a vector class. You may write other helper classes to make your work easier.
All classes will keep their data using Java arrays. Do not use Java collection classes.
The class GTUIterator implement these two iterator methods: next, hasNext as defined in
Write your driver program to test the all the classes and all of their methods.
 Use appropriate comments for JavaDoc and submit your documentation files.
 Test each method of each class at least once by writing driver code.
 You should submit your work to the moodle page and follow all the submission rules that will
be posted.