Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace RG_Assessment3
- {
- class MyStack : IStackADT
- {
- //calling my variables
- private IntArrayList list1;
- //constructror
- public MyStack(IntArrayList list1)
- {
- this.list1 = new IntArrayList(20);
- }
- public Boolean IsFull()
- {
- return list1.isFull();
- }
- public void Display()
- {
- list1.display();
- }
- public void push(int value)
- {
- list1.addFirst();
- }
- public int pop()
- {
- return list1.removeLast();
- }
- public Boolean isEmpty()
- {
- return list1.isEmpty();
- }
- public int size()
- {
- return list1.size();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement