In Listing 19.1, GenericStack is implemented using composition. Define a new stack class that extends ArrayList. Draw

Question:

In Listing 19.1, GenericStack is implemented using composition. Define a new stack class that extends ArrayList. Draw the UML diagram for the classes and then implement GenericStack. Write a test program that prompts the user to enter five strings and displays them in reverse order.

Listing

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: