tokenize an algebraic expression and convert it from infix to prefix and postfix

• 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 “[url removed, login to view]” 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.

Beceriler: Mühendislik, Java, Yazılım Mimarisi, Yazılım Test Etme

Daha fazlasını gör: infix prefix, tokenize infix, infix expression tokenize, infix postfix prefix convert program, postfix prefix java, convert infix prefix, convert postfix expression infix expression java, infix prefix java, vector vector string, vector string, vector library, string vector, string prefix, standard vector, standard library vector, prefix string, prefix of a string, named query, linked stack, linked it, library vector, java arraylist 1.5, java 1.4 arraylist, is in a prefix, integers and

İşveren Hakkında:
( 7 değerlendirme ) N/A, United States

Proje NO: #4436281



I used to work on these kind of problems 7 years ago.

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(0 Değerlendirme)

Bu iş için 11 freelancer ortalamada $42 teklif veriyor


HI i am interested

in %bids___i_period_sub_35% gün içinde100%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(146 Değerlendirme)

Hi, I am Java expert and can surely help you here, Thanks

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(192 Değerlendirme)

Let me help you.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(44 Değerlendirme)

i have 4 years experience in java. i can help you.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(8 Değerlendirme)

Hi I am a Java expert and I can help you in this project. Please let me know if you are interested. Thank you.

in %bids___i_period_sub_35% gün içinde50%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(4 Değerlendirme)

I can do that with pleasure,

in %bids___i_period_sub_35% gün içinde35%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

I am expert in the numerical calculations. I have executed the similar task in Java, so I can help you.

in %bids___i_period_sub_35% gün içinde35%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

We have big experience in Java. We can do it.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

i have done this before, i can start it immediately and deliver it in one day.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)

We can do it

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)