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

Java Please create a class called TenStack that uses either an array

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!