Write a simple abstract ordered_set class (an interface) whose methods include void insert(T val), void remove (T
Question:
Write a simple abstract ordered_set class (an interface) whose methods include void insert(T val), void remove (T val), bool lookup (T val), and bool is_empty(), together with a language-appropriate iterator, as described in Section 6.5.3. Using this abstract class as a base, build a simple list_set class that uses a sorted linked list internally. Try this exercise in C++, Java, and C#. Note that (in Java and C#, at least), you will need constraints on T. Discuss the differences among your implementations.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: