Question: Java Please create a class called TenStack that uses either an array or a Linked List to store its stack a. Data type of String
Java

Please create a class called TenStack that uses either an array or a Linked List to store its stack a. Data type of String b. Holds a maximum of ten items C. Allow the user (from main, etc.) to push to, pop from and peek at this Stack. i. Throw an appropriate Exception if the Stack is full when pushing 1. Throw an appropriate Exception if the Stack is empty when peeking/popping d. Please test this in main by creating a method called question that outputs "Questions 3:"on a new line, and then creates an instance of this class and pushes to it, etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
