The TreeSet class is built upon a backing instance of the TreeMap class. Discuss the advantages and disadvantages of this strategy for reuse.

What will be an ideal response?

By using a TreeMap to implement the TreeSet class, much of the common functionality can be shared. The TreeMap has more complex functionality, but by keeping it constrained to one set of values it eliminates the need for a second full implementation.

Computer Science & Information Technology

You might also like to view...

It is a standard convention among C# programmers to use ____________ for method names because it differentiates method names from variable and field names.

a. camel Case b. lowercase characters c. Pascal case d. uppercase characters

Computer Science & Information Technology

When using the compress utility, each file specified for compression is renamed with what extension?

A. .c B. .cmp C. .cpz D. .Z

Computer Science & Information Technology