Internal object of the stack class

Assignment Help Basic Computer Science
Reference no: EM132254247

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: EM132254247

Questions Cloud

Likert scale and the semantic differential scale : Compare and contrast the Likert scale and the semantic differential scale. Which scale is the most effective and why?
Describe the culture of low expectations : In the film we see several examples of schools characterized by a culture of low expectations and low achievement. Are there schools in your community.
Line segment connecting three points : Suppose that we have a line segment connecting three points, A, B, and C in that order and that AC/AB equals the Golden Ratio.
List and describe the vulnerabilities it might not address : A network administrator at PPI came to you with a new task. PPI has a LAN using TCP/IP.
Internal object of the stack class : You will be creating MyStack from scratch (do not use an internal object of the Stack class from java.util)
Research on windows network security : Organize all the steps necessary for implementing security on both a wired and wireless network.
Storage location of an element of a two-dimensional : Convert the formula we derived earlier for calculating the storage location of an element of a two-dimensional array stored in row-major order
Challenge for ebay database management : Identify at least three reasons why continuing business growth has been a challenge for eBay database management
How did kpis help in the success of the program : How did KPIs help in the success of the program? What improvements would you make to the overall ERM?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is multi-catch in java and how do we use it

What is multi-catch in Java and how do we use it?

  Different course names and meeting days

Write an application that stores at least four different course names and meeting days and times in a two-dimensional array. Allow the user to enter a course name (such as "CS 110") and display the day of the week and time that the course is held ..

  What is the return type of this method

Is there a method in the String class that tests whether a string ends with a given suffix? If so, what is it called and what are its parameters and return type?

  Derive the time and space complexity of your algorithm

Devise an algorithm to convert this binary search tree such a way that lesser values at the right subtree and larger values at the left subtree. Derive the time and space complexity of your algorithm

  How to create file autorun.inf on usb

How to create file autorun.inf on USB - You need to create file autorun.inf on USB. Who can help me? Thanks

  Develop a procedure for animating a three-dimensional object

Develop a procedure for animating a three-dimensional object by incrementally rotating it about any specified axis. Use appropriate approximations to the trigonometric equations to speed up the calculations, and reset the object to its position af..

  Production quota for the total number of items

A company manufactures x units of one item and y units of another. The total cost in dollars, C, of producing these two items is approximated by the function C=4x^2+3xy+6y^2+600. (a) If the production quota for the total number of items (both types..

  Differences and similarities of the business models

Recognize differences and similarities of the business models, taking into account the following factors: Who is the target audience for this Web site.

  Ethanolamine for an experiment

A chemistry student needs 70.0 g of ethanolamine for an experiment. By consulting the CRC Handbook of Chemistry and Physics, the student discovers

  Describe the order of function execution for baseconstructor

Next, change the information in both objects by calling the GetInfo functions, and then call the WriteInfofunctionto verify that the object data has been changed.

  One from manufacturing

One from manufacturing and the other from a service industry

  Ordered acquisition of synchronization objects

Write a short paper that recommends a deadlock avoidance approach most suitable for the TSI web server application that is not using an ordered acquisition of mutexes.

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