Create a stack class based on mylinkedlist class

Assignment Help Computer Engineering
Reference no: EM132136008

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.

Reference no: EM132136008

Questions Cloud

Analysis important for an organization : Why is environmental analysis important for an organization? Please be detailed.
Help me define corporate social responsibility : Help me conduct research on a Fortune 500 company and how do you determine just how (or if) the company ranks from a CSR perspective.
Federal deficit and federal debt : What are the differences between the Federal deficit and Federal Debt? How does a government budget deficit affect the economy
Minerals and natural resources : Based on land, minerals and natural resources, labor and entrepreneurial innovation, which country do you feel has the greatest long-term potential China or Rus
Create a stack class based on mylinkedlist class : Create a Stack class based on MyLinkedList class. A method to generate a number of elements between two given values and save them in a stack.
What is marketing discipline : What is marketing discipline? What is most people's perception of marketing discipline?
Australian prime minister : Imagine you are the Chief adviser to the Australian Prime Minister. 1) Clearly explain to him the meaning of 'subprime debt'? What are the risks and advantages
Write a program that should display a 10cent bonus for sales : The program should display a 10% bonus for sales over $10,000. Correct the syntax errors and then save, run, and test the program.
Drawbacks of hybrid pay for the members : What are the drawbacks of hybrid pay for the members of the sales teams? Can we alter the hybrid scheme to overcome these drawbacks?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Constructing truth table of converter circuit

Construct the truth table of the converter circuit using character a , b, c and d (d represents Least Significant Bit) in order to denote the literals input of BCD. Use w, x, y and z (z as Least Significant Bit) in order to represent the output li..

  Implementing compstat

Explain how COMPSTAT, as an information system (IS), implements the four basic IS functions Calculate how information systems have enabled the police departments which implement tools like COMPSTAT in order to respond to the crime faster.

  Securing system using iptable firewall

Discuss the advantages and disadvantages of firewalls with iptables and make suggestions to overcome the disadvantages in your report - Start the services and ensure that they are available for you to do experiment with IPTable Firewall.

  Create wild safari interface that incorporate your own theme

Using Flash, Photoshop, or Illustrator, create the Wild Safari interface that incorporates your own theme and design. Be creative! The interface should be easy to navigate and should look professional.

  Implenting a code

Write down a fragment of code which reads a line of text (using getline) from standard input containing of a last name followed by the first name

  Write a program that reads a number and displays the square

Write a program that reads a number and displays the square, cube, and fourth power. Use the Math.pow method only for the fourth power.

  Who needs to be on the incident response team

In today's highly connected world, cyber incidents happen on a daily basis. Every corporation from the very large to small and medium (SME) companies.

  How to create an encryption absolutely unbreakable

How to create an encryption absolutely unbreakable

  Discuss cookies and two other pieces of information

Identify two specific types of data that should be stored in cookies and two other pieces of information

  Propose a use case scenario for reusing architectural model

Reusability of prior designs is critical when creating best-practice solutions in the enterprise.

  Difference between assembly and high-level languages

What is the basic difference between assembly and high-level languages? Why would you choose one over the other?

  List two examples of hardware features that are used

List two examples of hardware features that are used to help the OS perform its work. What are the advantages and disadvantages of relying on the hardware?

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