Tokenize a algebraic expr and sorted, JAVA Programming

Assignment Help:

?
• ?read from a file a series of an infix algebraic expressions comprised of constant and variable operands (integers), operands (%, *, /, +, -) and parenthesis. Two slashes (//) represents the beginning of a comment that is not part of the expression
• For each line read:
1. Display the input on the console.
2. Store the expected result in a variable for later comparison. Display the comment.
3. Separate the algebraic expression from the string and then convert the expression to a postfix algebraic expression.
4. Display a list of constants in the expression.
5. Display a list of variables in the expression.
6. Query the user for a value to assign to each the variable (Ask only once for each variable regardless of the number of times it occurs in the expression).
7. Display the postfix expression.
8. Determine and display the numeric result of the expression, using integer math.
9. Determine if the computed answer and the expected result are the same and post an appropriate message.

Coding Standard: The program may use only the Java library Scanner, System, Vector, Arraylist, Linked List, Stack and Java standard file handling classes. The use of arrays is permitted. All input is from a file named “input.dat” and output must be to the Java Console.

Extra explanations;


• It reads in each line of the input file and displays it.
• It correctly identifies and displays all constants used in the expression, including their sign. Note: The minus symbol can indicate either subtraction or a negative constant.
• it displays it the comment to the console.
• it displays a list of all the variables in the expression.
• it queries the user for a value for each variable
• it queries the user for a value for each variable (only once for each occurrence).
• Correctly converts the infix formula into postfix and displays the resulting expression.
• it substitutes the values specified for each variable and displays the new postfix result.
• it correctly resolves postfix and displays the result.
• it writes all output required from the console to a file.


Related Discussions:- Tokenize a algebraic expr and sorted

What is aop alliance, AOP Alliance is an open-source project whose goal is ...

AOP Alliance is an open-source project whose goal is to promote adoption of AOP and interoperability between different AOP implementations by describing a common set of interfaces

Decsion tree, implementation of DT in netbeans

implementation of DT in netbeans

Multi treading array program, You are to write a program name arrayScaling....

You are to write a program name arrayScaling.java that will randomly generate 5000 integer number raging from 1 - 49 and place them in an array. 1.  The program will scale thi

Game of life, Conway's Game of Life is a "cellular automaton" that is playe...

Conway's Game of Life is a "cellular automaton" that is played on a 2D grid (array) of cells. At the start of the game, an initial configuration is set up in which a number of cell

I want software tool for sequential circuit analysis, I want Software Tool ...

I want Software Tool for Sequential Circuit Analysis The output of the program could be both graphical for the diagram and the rest is console. Skills required: C++ Progra

Develop a fantasy football, Need to develop a Fantasy football Project D...

Need to develop a Fantasy football Project Description: I am seeking to build a Fantasy football website. i already have an example of existing website. i want the exact same

List the unexpected quotients in java, List the unexpected quotients in jav...

List the unexpected quotients in java? 2/3 = 0 3/2 = 1 1/0 = ArithmeticException 0/0 = ArithmeticException 1.0/0.0 = Inf 1.0/0 = Inf 0.0/0.0 = NaN -1.0/0.0

I want fitlife app for android - ios, I want FitLIFE app for Android, IOS, ...

I want FitLIFE app for Android, IOS, Windows Project Description: Hello, I want to develop an app for Android, IOS and Windows Phone. This app will be work with open source B

Bilbo board , Design and simulate the bilbo board which should include thre...

Design and simulate the bilbo board which should include three configurable bilbos and some application logic to verify tester operation. the system will be designed using proteus

Write Your Message!

Captcha
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