Quick fix wanted
CalanderDate.Java File is used to run Chapter14.Java which needs to changed
Stack.Java stays the same.
Create a Class called Chapter14.java with public static methods that provide solutions to the following Exercises in the text.
with the following significant modifications, so please read carefully:
I will use
Stacks can be empty, so don’t let your code blow up in those cases.
If we examine two Stack objects (#5), be able to handle the case that they are the same object.
2. stutter, modify to return the stuttered Stack, and leave the original Stack unchanged.
5. equals, use the String equals method for comparisons, leave the original Stacks unchanged.
15. isSorted, use compareTo to evaluate if sorted, and leave the original Stack unchanged.
19. removeMin, use compareTo for evaluating the minimum.
Only the last method here will modify the Stack passed in as a parameter.
And I will allow, YES, the use of the Collections Class.