Question: Fixed & Variable Stacks and Double Linked - Lists ( 1 0 0 pts ) A ) Fixed - sized Stack ( fixed stack code

Fixed & Variable Stacks and Double Linked-Lists (100 pts)
A) Fixed-sized Stack (fixed stack code can be found in the "Assignment5_A" IntelliJ project).
Your task for Part A is to fully implement the "BookFixedStack" class. The
BookFixedStack class is a fixed stack that holds Book objects. This stack class
is initialized to a fixed size - the "top" variable indicates the top of the stack.
(Note that if the stack is empty, top should be -1).
The fixed stack methods that need to be implemented are as follows:
public boolean push(Book book)
Push "book" onto the stack; return null of the stack is full.
public Book pop()
Example Stack
Remove the top Book from the stack and return it. Return null if the stack is empty.
public Book peek()
Return a reference to the top Book on the stack. Return null if the stack is empty.
public boolean isEmpty()
Return true of the stack is empty, false otherwise.
public boolean isFull()
Return true of the stack is full, false otherwise.
The "main" method in the Assignment5_A class will test your BookFixedStack implementation, and
will indicate pass/fail at each step.
 Fixed & Variable Stacks and Double Linked-Lists (100 pts) A) Fixed-sized

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!