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
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