Question: Build and use your own minimal stack class using an array to hold the stack. a) Create a NetBeans project and name it p5_3_your-id. b)

Build and use your own minimal stack class using an array to hold the stack.

a) Create a NetBeans project and name it p5_3_your-id.

b) In your project, create a stack class based on an array of type double of fixed size. In the class,

i) The array should have the default size of 5.

ii) The array size should be settable via a constructor.

iii) The following methods must be implemented:

a) push inserts a value a the top of the stack

b) pop returns the top value, removing it from the stack

c) isEmpty returns true if the stack is empty, false otherwise

d) isFull - returns true if the stack is full, false otherwise

c) Add code to your project demonstrating the stack and all methods and constructors in the class work correctly.

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!