Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

STACK - java, plz use simple java language, netbeans 8.1 or 8.2

1. Create a Stack class based on MyLinkedList class. Use this class in the following:

2. Create a new Java Application that has the following methods:

1. A method to generate a number of elements between two given values and save them in a stack.

2. A method to print a stack (10 elements per line). The original stack should remain as is after the print.

3. A method to return the number of elements on the stack.

4. A method to return if the stack is empty or not.

5. A method to search for a value in a stack. The stack should remain the same after the search is finished.

6. A method to print the second element of the stack and leave the original stack unchanged

7. A method to count the number of elements in a stack that are larger than a given value and leave the original stack unchanged.

8. A method peekLowestElement to return the smallest element. The original stack should remain unchanged.

9. A method peekHighestElement to return the largest element. The original stack should remain unchanged.

10. A method to inverse a stack.

11. A method to make a copy of a stack into another stack

• In the main method test all your methods including the following cases:

! Create 3 Stacks S1, S2, S3

! Insert 20 integers between 20 and 60 (do not insert duplicates) into S1

! Insert 30 integers between 10 and 80 (do not insert duplicates) into S2.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93123473

Have any Question?


Related Questions in Computer Engineering

Access your browsers security settings and configure the

Access your browser's security settings and configure the browser to refuse all cookies or to prompt you before allowing a cookie. Restart the browser; then visit several different Web sites. Be sure to visit popular sit ...

Question what are the risks of transmitting data over an

Question : What are the risks of transmitting data over an unsecured Wi-Fi network? What steps are necessary to secure Wi-Fi Protected Access Network? Distinguish between client/server and file server architecture. Is te ...

For the following reactionnbsp199nbspgrams ofnbspcarbon

For the following reaction,  19.9  grams of  carbon monoxide  are allowed to react with  14.4  grams of  oxygen gas . Carbon monoxide  ( g ) +  oxygen  ( g )  ------>  carbon dioxide  ( g ) What is the maximum amount of  ...

Uranium vi fluoride is crucial for the enrichment of

Uranium (VI) fluoride is crucial for the enrichment of weapons-grade uranium. If a 1.0 mol sample of helium effuses in 255 s, how many seconds will it take for the same amount of uranium (VI) fluoride to effuse under the ...

What are the two potential souces of inefficiency in the

What are the two potential souces of inefficiency in the health care market?

1 what would be the purpose for a user to protect a

1. What would be the purpose for a user to protect a file from "read" or "write" access by other users? 2. Is there a reason why it would be safer for administrators to use two different accounts when working with a comp ...

Solve the water-jug puzzle given a 3-litter jug named three

Solve the water-jug puzzle given a 3-litter jug, named Three, and a 4-liter jug, named Four. Initially, Three and Four are empty. Either jug can be filled with water from a tap T, and one can discard water from either ju ...

You are the senior information security manager for a

You are the senior information security manager for a federal agency. You received a phone call from an employee stating that his laptop was stolen from his workstation. He tells you that the laptop has at least 20 cases ...

A small sports club keeps information about its members and

A small sports club keeps information about its members and the fees they pay. The secretary wants to be able to record when members pay and print a report similar to that in the figure below. last n me - first_narne - p ...

Construct a frequency distribution for the number of

Construct a frequency distribution for the number of different residences occu-pied by graduating seniors during their college career, namely 1, 4, 2, 3, 3, 1, 6, 7, 4, 3, 3, 9, 2, 4, 2, 2, 3, 2, 3, 4, 4, 2, 3, 3, 5

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As