View the step-by-step solution to:

# Develop an algorithm using the Java programming language that implements a basic stack data structure. Your stack must have the ability to push...

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.

For this assignment, assume that you are developing a system for a manufacturing assembly line that builds automobiles. There are three stations in the manufacturing line where an inspector will visually inspect the vehicle. You program must keep track of these inspections as they occur. You decided to develop your program using a stack data structure. As your vehicle begins the line you will push the number 0, which indicates that that an inspection has not yet occurred, onto the stack three subsequent times.

At each station in the line you will pop one of the items off of the stack. Each time your algorithm pops an item from the stack you must print it out to the console using the System.out.println function. Your algorithm should perform the functions of the stack as illustrated in the above diagram.

You will develop your algorithm using Java code, and by using the Jeliot tool as a development environment. Jeliot can be executed directly from the following website (http://cs.joensuu.fi/jeliot/javaws/jeliot.jnlp). Instructions for using Jeliot can be found at http://cs.joensuu.fi/jeliot/index.php.

As part of your assignment you must submit both a description of the assignment and how your algorithm works including an Asymptotic analysis of your algorithm. Your analysis must include the efficiency of your algorithm expressed in Big Oh notation.

As part of your assignment, you must include the code of your algorithm.

Also,
It must provide the correct output based upon the input

It must be composed of concrete steps

There can be NO ambiguity of the flow of the algorithm

The algorithm must have a finite number of steps that is determinable

The algorithm must terminate or complete

Sign up to view the entire interaction

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents
• ### -

Question & Answers

Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

Ask a Question