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

  Write a program that will calculate monthly pay

Write a program that will calculate monthly pay and expenses for a commercial utility sales person. Sales employees in this company are paid monthly. Each employee is paid a base pay of $1,000 and 9½ % commission on sales. The company deducts 18% of..

  Relation between the objects

What will be said about the relation between the objects object1 and object2 - Make this program using java programming.

  Determine the visual resolution of resulting image

Drawing in 8.5 by 11 inch sheet is digitized by means of 300 dpi (dots per inch) scanner. Determine the visual resolution of resulting image (number of dots in each dimension)?

  Write java statements that use a for each loop to cycle

Write java statements that use a for each loop to cycle through all the elements in an ArrayList of doubles named grades.

  Application that displays a menu of three items in a resto

Modify the application in Ã?xercise 9a so that if the user makes a menu selection he or she has already made, ignore the selection - this is, do not add a second price for the same item to the total. The user is still allowed only three entries

  Write a java application program called largest.java

Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers

  Prepare a point class that represents points

Prepare a Point class that represents points on an x, y axis. The data members should be doubles x and y plus an int value called count that represents the number of points presently instantiated

  Design a class named magazinesubscription

Design a class named MagazineSubscription that has fields for a subscriber's name, the magazine name, and number of months remaining in the subscription.

  Problem regarding the java memory model

Draw a box-and-arrow illustration showing the order constraints on the memory actions (read, load, use, assign,store, write) associated with the four assignments that appear in the two threads (you do not need to show these actions for the two assg..

  Determine the number of quarters

You have an amount of change (such as 41 cents or 72 cents) and you want to figure out how many quarters, dimes, nickels and pennies that is. Your change will always be an integer value between 0 and 99.

  Write an enhanced for loop that iterates over each student

Calculates the tuition for each student. Write an enhanced for loop that iterates over each Student in. pStudentList. For each Student, call calcTuition() on that Student. Note: this is a polymorphic method

  Create a frame and set its layout to flowlayout

Create a frame and set its layout to FlowLayout, create two panels and add them to the frame and Each panel contains three buttons. The panel uses FlowLayout.

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