Question: Modify the push implementation so it does not allow duplicate items in the stack. So, if the caller wants to push an item that is

Modify the push implementation so it does not allow duplicate items in the stack. So, if the caller wants to push an item that is already in the stack, a simple message is displayed, nothing is pushed. Assume the object must have necessary functions to check equality. To anwer this question you must implement pushNoDuplicates(ltem t) method public class GenericStack
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
