EXP 4 PROGRAM FOR STACK ADT USING INTERFACE
- Get link
- X
- Other Apps
PROGRAM FOR STACK ADT USING INTERFACE
AIM
To design a java application to implement array implementation of stack using the concept of interface
and exception handling.
PROCEDURE
1. Create the interface stackoperation with method declarations for push and pop.
2. Create the class astack which implements the interface and provides implementation for the
methods push and pop.Also define the method for displaying the values stored in the stack.Handle the
stack overflow and stack underflow condition .
3. Create the class teststack .Get the choice from the user for the operation to be performed . and also
handle the exception that occur while performing the stack operation.
4. Create the object and invoke the method for push,pop,display based on the input from the user.
- Get link
- X
- Other Apps
Comments
Post a Comment