University of the People Programming Assignment unit 3 CS 3305 - Web Programming 2 Shahin Fatima 5 th Dec 2023 THE BELOW IS MY SCREENSHOT FOR THE COMPLETION OF 3 SECTIONS OF THE COURSE (Introduction, PHP Basics and PHP Arrays) IN UDEMY University of the People
Programming Assignment unit 3 CS 3303 - Data Structures Instructions: Develop an algorithm using the Java programming language that implements a basic stack data structure. Your stack must have the ability to push entries on the stack. Your stack must also have the ability to pop entries off of the stack. import java.util.EmptyStackException; Stack Implementation in Java
class Stack { private Node top; // Top of the stack // Node class for linked list implementation private class Node { int inspectionNumber; Node next; Node(int inspectionNumber) { } this.inspectionNumber = inspectionNumber; } // Method to push items onto the stack (Adapted from Shaffer, 2011) public void push(int inspectionNumber) { Node newNode = new Node(inspectionNumber); newNode.next = top; top = newNode; } // Method to pop items off of the stack (Adapted from Shaffer, 2011) public int pop() {