Java stack assignment | Computer Science homework help

Create an array of Strings, and using a stack, reverse the order of the Strings in the array.

For example, the strings in the array might be “Joe”, Fred, “Mary”.  The reversed array would be “Mary”, Fred, “Joe”.

You should create a Stack class and a StackElement class for this assignment, then use these classes in your software.  Your stack should be a linked data structure, similar to a linked list.

The main method should initialize an array of Strings – either with an explicit array declaration or by reading the data from a file.  You should have at least five Strings in your array, but the software should work no matter how many Strings are in the array.

Your stack class should maintain a stack pointer and the size of the stack, and should have methods to:

  • Push a new element onto a stack (This method should put data onto the stack, which means it must first put the data in a stack element.)
  • Pop an element off the stack and return the data in the element.
  • Print a list of the data in the stack.
  • Return the current stack size.

Please use netbeans on this assingmnet

Calculate your essay price
(550 words)

Approximate price: $22

How it Works


It only takes a couple of minutes to fill in your details, select the type of paper you need (essay, term paper, etc.), give us all necessary information regarding your assignment.


Once we receive your request, one of our customer support representatives will contact you within 24 hours with more specific information about how much it'll cost for this particular project.


After receiving payment confirmation via PayPal or credit card – we begin working on your detailed outline, which is based on the requirements given by yourself upon ordering.


Once approved, your order is complete and will be emailed directly to the email address provided before payment was made!