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

Calling the function, You may call function from any other place into your ...

You may call function from any other place into your JavaScript code. After the function is executed, the control goes back to other script which called it.  alert('Example 1: t

Develop a supply chain management, Develop a Supply Chain Management Pro...

Develop a Supply Chain Management Project Description: Supply Chain Management from HK and China Skills required is Java

Multiple choices output and codes, codes and output on how to make multiple...

codes and output on how to make multiple choices quiz

High quality leads and directory scraping, Project Description: (1) I wa...

Project Description: (1) I want a comprehensive list of Australian chiropractors. The data requires coming from various sources including Google but the following are obligatory

Explanation of the inputstream with suitable diagrams, Problem 1) Descr...

Problem 1) Describe the concept of interfaces in Java with a suitable example for the same Explanation of the concept of interfaces with example 2) Describe the Inp

Password Generator Software, In this exercise, I want you to generate passw...

In this exercise, I want you to generate password based on random number generator. Develop an application that keeps track of the URL, username and password. I have listed few st

Convert psd to android, Convert PSD to Android (UI only, no database) Pr...

Convert PSD to Android (UI only, no database) Project Description: I want someone highly proficient in Photoshop and Android SDK to change series of PSD files into live Andro

Difference among microprocessors and microcontrollers, What is the differen...

What is the difference among microprocessors and microcontrollers? Give one example of both? The microprocessor is electronic equipment that can perform various functions and a

Need to develop web server, Project Description: I wish to prepare a Web...

Project Description: I wish to prepare a Web server which provides subsequent Web Services. 1. User login 2. User input data store to server 3. User fetches results fro

Describe synchronization in respect to multithreading, Describe synchroniza...

Describe synchronization in respect to multithreading. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared res

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