A generic stack class called mystack

Assignment Help Basic Computer Science
Reference no: EM132253137

Data Structures

1. a generic queue class called MyQueueMyQueue will implement the QueueInterface given you. You will be creating MyQueue from scratch (do not use an internal object of the Queue class from java.util)

2. a generic stack class called MyStackMyStack will implement the Stack Interface given you. You will be creating MyStack from scratch (do not use an internal object of the Stack class from java.util)

Utility Class

The Notation class will have a method infixToPostfix to convert infix notation to postfix notation that will take in a string and return a string, a method postfixToInfix to convert postfix notation to infix notation that will take in a string and return a string, and a method to evaluatePostfix to evaluate the postfix expression. It will take in a string and return a double. A method to evaluateInfix to evaluate the infix expression. It will take in a string and return a double. Follow the Javadoc provided for you.

In the infixToPostfix method, you MUST use a queue for the internal structure that holds the postfix solution. Then use the toString method of the Queue to return the solution as a string (this will differ slightly from the algorithm in your book).

For simplicity sake:

a. operands will be single digit numbers

b. the following arithmetic operations will be allowed in an expression:

           +         addition

           -         subtraction

           *         multiplication

           /          division

Exception Classes

Provide the following exception classes:

1. InvalidNotationFormat - occurs when a Notation format is incorrect

2. StackOverflowException - occurs when a top or pop method is called on an empty stack.

3. StackUnderflowException - occurs when a push method is called on a full stack.

4. QueueOverflowException - occurs when a dequeue method is called on an empty queue.

5. QueueUnderflowException - occurs when a enqueue method is called on a full queue.

Reference no: EM132253137

Questions Cloud

Likert scale and the semantic differential scale : Two of the classic approaches to rating scales are the Likert scale and the semantic differential scale.
Business report assignment about samsung company : Briefly describe two to three recent events where your company was in the news and describe how they affected the company.
Write the program that asks the user for a color : Write the program that asks the user for a color, a line width, a line length and a shape. Assume that the user will specify a shape
What business do you want to start : What business do you want to start, and why? Explain your personal connection to this type of business and discuss sources of information about this business.
A generic stack class called mystack : a generic queue class called MyQueue. MyQueue will implement the QueueInterface given you. You will be creating MyQueue from scratch
Calculating the storage location of an element : Convert the formula we derived earlier for calculating the storage location of an element of a two-dimensional array stored
What is the overall themes for the dying christian : What is the overall themes for The Dying Christian to his Soul, I Travelled among unknown Men and My Parents and I?
Challenge for ebay database management : Identify at least three reasons why continuing business growth has been a challenge for eBay database management
What are some of the grievances in the united states : What are some of the grievances in the United States and France? Now that you know the damages of the free market utopia, what could we draw from the backlash.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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