Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA. For this assignment, you will create a generic class called BoundedStack. The implementation of a BoundedStack is very similar to the implementation given for
JAVA.
For this assignment, you will create a generic class called BoundedStack. The implementation of a BoundedStack is very similar to the implementation given for a Stack. However in the case when the capacity is exhausted, a call to push will result in the placement of the new item at the expense of the loss of the least recently accessed item. A bounded stack: A collection of items that are inserted and removed according to the last-in first-out principle, but with overflow handled by the renoval of the least-recently accessed iten For this project you will create a generic BoundedStack class that will be used by the main method for two different data types: String and Double. An object of the BoundedStack class declared as a String BoundedStack will be used for a browser back button. Another object of the BoundedStack class, this one declared as a Double BoundedStack, will be used to get spell potency values for a maji game. You can create your own BoundedStack class from scratch using a linked list or array implementation, or you can modify any of the classes provided in the modules to meet the requirements of a bounded stack. However, you cannot use any of the classes from the Java Collections Framework, (like ArrayList, etc). Just for fun, I do highly recommend trying this assignment with one of more of these classes, but do not turn that in Important Note: I will ask you to redo the assignment if you use a Stack class that does not meet the requirements of a bounded stack that handles overflow over 50 items, or if you implement your BoundedStack with a class from the Java Collections Framework. Requirements for the generic BoundedStack class: This class must be named BoundedStackStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started