What is the characteristic behavior of a stack

Assignment Help JAVA Programming
Reference no: EM131320693

Submit one properly named .rtf document inside your one .jar file. lastname.firstname.mod4.

1. What is the characteristic behavior of a stack?

2. What is the characteristic behavior of a queue?

3. What are the advantages of the java.util.Stack implementation of a stack?

4. What are the dis-advantages of the java.util.Stack implementation of a stack?

5. Hand trace a stack X through the following operations, for your answer show the values remaining in the stack (be certain to indicate the ‘top' of the stack:

a. X.push(new Integer(4));

b. X.push(new Integer(3));

c. Integer Y = X.pop();

d. X.push(new Integer(7));

e. X.push(new Integer(2));

f. X.push(new Integer(5));

g. X.push(new Integer(9));

h. Integer Y = X.pop();

i. X.push(new Integer(3));

j. X.push(new Integer(9));

6. Given the resulting stack X from the previous exercise, what would be the result of each of the following? In your answer give the value of "Y" or "Y and Z". Note: Steps b. and c. should view the stack as coming out of the previous step.

a. Y = X.peek();

b. Y = X.pop(); Z = X.peek();

c. Y = X.pop(); Z = X.peek();

7. Complete exercise 21.4 (SelectionSort and SelectionSortDemo).

8. Complete exercise 21.7 (IET and IETDemo (IsEqualTo)) (see below)

9. Complete exercise 21.8 (Pair and PairDemo). (see below)

10. Complete the LinkedStack.java in the supplied jar file.

11. Also complete the ArrayStack.java.

12. Convert the PostFixEvaluator to use the ArrayStack. Create a lastnameArrayStack package for this.

13. Convert the PostFixEvaluator to use the Java.Util.Stack. Create a lastnameStack package for this.

Reference no: EM131320693

Questions Cloud

How does this issue impact the overall operations of court : Give an example of a current/future issue facing courts and court administrators today. How does this issue impact the overall operations of the court system within the criminal justice system
Draw to scale the three electron energy level : Draw to scale the three electron energy level and transition energy diagrams of the isolated neutral He atom and the He+ lon in analogy to Figure (a)-(c) but taking into account the +2 nuclear charge from the two protons.
What marketing techniques or messages you believe had : MKT 3000-In three (3) complete sentences or more, explain what marketing techniques or messages you believe had the MOST influence during this Presidential campaign.What sources of marketing/public information do you believe MOST influenced people ..
Discuss the classification of static fields : Outline the steps involved in the electrostatic field analysis of a parallel plate structure and the determination of its capacitance.
What is the characteristic behavior of a stack : What is the characteristic behavior of a stack? What is the characteristic behavior of a queue? What are the advantages of the java.util.Stack implementation of a stack?
Summarize the current state of victims rights in your state : Write a 700- to 1,050-word paper in which you summarize the current state of victims' rights in your state (including identifying the existence of any victims' rights laws) and assess their impact on criminal law proceedings
Describe the characteristics of the moleskine consumer : Describe the characteristics of the Moleskine consumer. Write down a list of the various personalities you think they might possess. Do they have anything in common with other consumers?
Taxes per year in order processing costs : Your firm is contemplating the purchase of a new $550,000 computer-based order entry system. The system will be depreciated straight-line to zero over its five-year life. It will be worth $54,000 at the end of that time. You will save $290,000 before..
What do you think their leadership style is : Think about a leader. This could be someone you know personally or someone that you are familiar with that was a leader. This can be a political figure (I don't want to hear about your political views but why this leader fits the definition of a l..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd