Closed

Need a good Java Programmer!!

This project was awarded to swteam4 for $30 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Skills Required
Project Budget
$30 - $250 USD
Total Bids
3
Project Description

Hi,

I need a honest person who can write me a java programming assignment.

The instruction is as following:

"General statement

In this lab you will be asked to write a simple interpreter for arithmetical expression evaluation using stacks. According to wikipedia, expression is a finite combination of a symbols of a known context. It is possible to write the same arithmetical expression in different forms.

In the infix notation, we write

operand1 operation operand2

Example:

( 1 + ( ( 2 + 3 ) / 5 ) ) * -4

In the postfix notation, we write

operand1 operand2 operation

Example:

1 2 3 + 5 / + -4 *

Also there exists prefix notation where we write

operation operand1 operand2

Example:

* + / + 2 3 5 1 -4

You might find this algorithm useful in solving this problem.

Assignment

Given a String in the infix notation , find its postfix notation and evaluate it. Conversely, given a String in the postfix notation find its infix one and evaluate it. Expressions to be evaluated might include the following operations:

+,-,*,/,^

As well as brackets:

(, )

Numbers in the expressions can be only integers ( negative, 0 , positive).

Extra-credit (+10)

Implement expression evaluation for vectors. Expression might only include the following operations:

a) numbers operations

+,-,*,/,^

b) vector operations

+,-

c) brackets ( for both, numbers and vectors )

(, )

d) vectors will be denoted as ( square brackets mean start of the vector, they are not brackets used to change precedence of the operations; comma denotes another vector component )

[ x1 , x2 , ... , xn ]

Sample input:

[ 1 , ( 3 - 4 ) ] - ( [ -2 , ( 7 - 8 ) * 2 ] + [ 0 , 4 / 2 ] )

Output:

//postfix

[1 , 3 4 - ] [ - 2 , 7 8 - 2 * ] [ 0 , 4 2 / ] + -

//evaluation

[ 3 , -1 ]

Implementation

Implement the class Expression and functions infixToPostfix(), postfixToInfix(), evaluate(). More specifically, implement the following:

public class Expression{

public Expression(String inputExpression, String inputNotation){

// your constructor here

}

public static Expression infixToPostfix(Expression expression){

//get expresion exp in the postfix notation ( you have to use stack for it)

}

public static Expression postfixToInfix(Expression expression){

// get expression exp in the infix notation

}

public static String evaluate(Expression expression){

//using stack evaluate Expression expression based on the notation

}

}

If you are interested in, please message me for more information.

And this assignment is due in 2 hours, so I need person who is fast programmer.

Thanks,

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online