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

  Develop various features of application software

You will also develop various features of application software that you will use in the day to day running of Better Buy Bespoke.  You will use your expertise to create macros that will automate features and functions of the application software

  Display the appropriate greeting for the users choice

SDEV 140 : Include the comment lines for Author, Date and Description. Display the menu presented in Exercise 1.

  Discuss cost-to-loss ratio problem

Cost-to-loss ratio problem. Consider the decision problem shown in Figure. This basic decision tree often is called a cost-to-loss ratio problem.

  Write a program for your microcontroller in c

Write a program for your microcontroller in C and then in assembly (or vice versa) to find the largest of thirty-two 8-bit two's-complement numbers in 32.

  What is the intended meaning of the given queries

Write a PROLOG program which checks if a list contains another as a sublist. What is the intended meaning of the given queries?

  How does your style impact the technological tools

Here is an assessment on Leadership Style. Please take this assessment and provide an analysis of the results. How does this relate to you?

  Describe a simple scheme that allows peers to verify blocks

Assume that when a peer joins a torrent, it initially gets a .torrent file from a fully trusted source.

  How does the auto discovery feature of snmp operate

How does SNMP version 3 handle security? Write a report that summarizes the main features of version 3. How does the auto discovery feature of SNMP operate?

  Questioni briefly describe the concept of queuesii give

questioni briefly describe the concept of queues.ii give two applications of queues in computing.iii describe

  Prepare a set of nonfunctional requirements

Prepare a set of nonfunctional requirements, including operational requirements, performance requirements, security requirements, and cultural and political requirements. Much information is incomplete, but do your best.

  Use shared memory for command execution

Show me a working implementation, in C source code, of a Linux shell that will use shared memory for command execution using pipes that read data.

  Why do you think that many parents appear to prefer to use

1. reflect on the parenting style andor model of your own parents or guardians. based on what you observed and what you

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