Follow the javadoc

Assignment Help Basic Computer Science
Reference no: EM132243832

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

Questions Cloud

Array of resources found on the web : As a Linux user you can benefit from an array of resources found on the web. Go online and find 2 resources related to Managing Linux Processes.
Define ways to deal with the moral hazard problem : Determine the ways your company is dealing with the moral hazard problem and suggest best practices used in the industry to deal with it.
Difference between a join and union statement : Answer the questions below using the same dataset. For instance, if you decide to use a "vendor database" in your example, use it to answer both questions.
What do you feel is the cause of their disagreement : What do you feel is the cause of their disagreement? How would you have approached the situation had you been principal of the school?
Follow the javadoc : 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.
Supposed to keep publicly traded companies well governed : Describe the various "mechanisms" that are supposed to keep publicly traded companies well governed.
Write a reflection paper on the outcomes from conference : Hold a post conference with the classroom teacher and/or mentor to discuss findings from the walkthrough.
Compare global business competitiveness : Explain how their global business competitiveness (examples may include: institutions, infrastructure, macroeconomic environment, health and primary education.
Pizza king and noble greek are competitive pizza chains : Pizza King (PK) and Noble Greek (NG) are competitive pizza chains. To maximize its expected profit, what price should PK charge for a pizza?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the terms-of-trade effect of growth

When the nation is large enough to affect relative commodity prices?

  Organizational and business model change

How do you think security issues and fallout from a this situation may cause organizational and business model change? Or will nothing happen?

  Pc that used to operate correctly displays a message

A PC that used to operate correctly displays a message, BOOTMGR is missing. Research this problem and make a list of possible reasons why a PC could report this error

  Determine the force developed in spring ab

The coefficient of static friction between the belt and the rim of the wheel is µ=0.2, and between the belt and peg Cµ'S=0.4 . The pulley at B is free to rotate

  Draw a lai artifact table to define a module

Using the notation of your choice, draw a process diagram of a software development process that prototypes three different designs and choose the best from among them.

  When does the system have to pay its bills

Suppose one of the suppliers to Seattle Health System offers terms of 3/20, net 60.

  Calculate kc

CH4(g)+2H20(g) ---, CO2 (g) +4H2 (g) At equilibrium, 4.80 g of CO2 is present. Calculate Kc.

  How high should the designer make the hill

The designer of a coaster wants the coaster to have a velocity of 95 feet per second when it reaches the bottom of the hill. If the initial velocity of the coaster at the top of the hill is 15 feet per second, how high should the designer make the..

  What are the equilibrium price and quantity

What are the equilibrium price and quantity? How many benefits do bicycle consumers and producers receive when the market is in the equilibrium?

  What are the necessary conditions to achieve deadlock

What are the necessary conditions to achieve deadlock?

  Calculate the fibonacci numbers using recursive function

A recursive function to calculate the Fibonacci numbers was presented in this chapter. However, each time a number was calculated, it recalculated previous.

  Definition to represent a race result for a competitor

No longer in the race as they may have been pulled due to injury, disqualified for violating rules during the race, or the time they took to race in seconds with accuracy to 2 decimal places. Design a data definition to represent a race result for..

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