In this assignment you are required to write a complete code execution system for the language given below. You must follow the guidelines to the letter, otherwise you may lose significant amount of points even if your program does the requested job. Your system should have two types of statements, variable assignment and expressions. In variable assignment, you will have variable name followed by = symbol which will be followed by a standard expression. Expressions can include variables, regular arithmetic operators (+, -".), power operator (^) and parenthesis. Additionally, your system should support negative operator (-), a hint will be provided at the end of the assignment to help you accomplish the task. Regular arithmetic operators are left to right while negative and power operators are right to left. To get full marks, your system should accept multi character variables, multi digit numbers and work with doubles. Thus, 2.5 - 2 should produce 4.5 correctly. No need to distinguish between integers and real numbers, treat everything as double. You can use std:stod function in C++ to convert a string to double. Your program should read a complete line. In C++ you can use std: :getline(std::cin, line); to read the line to the string variable line. Assignment shall not produce any output (not even newline). If the statement is just an expression, you shall print the result of it. The output should only contain numbers followed by a new line. Your program should terminate if it receives ! as input. You should use shunting yard algorithm to perform this task. You do not need to produce postfix output or AST. Simply perform the calculation. You can use any programming language that I will be able run in my system. These are C++, C, python, php (cli only), nodejs, and haskell. Any attempt at cheating will result in O and most likely you will fail the course. Do as much as you can, partial points will be given. Just ensure your program is compiling and running, even if it produces wrong results. You may test your application with the following input. The output you should produce is marked red. Your program should not crash during the entire run, it should keep asking for more input. You should submit a single code file. I should be able to compile and run this single file by itself. If moodle does not allow your program extension, save it as text file and upload. 2+2 4 2+3*2 8 2-2*3+2)+2 14 14-2^2 10 2^3^2 512 5+9 14 8*-4 -32 x+5 9 y =x+ 2x 12 my = x+y/2 my^2 100 !

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Has anyone can help? Doesn't matter which language you use for to create that code asked in question. I just need example code for question asked. I can rebuild code. JUst please help me for example code like question asked. Thank you for your answers. I really need this. Have a good day.

In this assignment you are required to write a complete code execution system for the language given below. You must follow the guidelines to the letter, otherwise you may lose significant amount of points even if your program does the requested job.
Your system should have two types of statements, variable assignment and expressions. In variable assignment, you will have variable name followed by = symbol which will be followed by a standard expression. Expressions can include variables, regular arithmetic operators
(+, -, *, /), power operator (^) and parenthesis. Additionally, your system should support negative operator (-), a hint will be provided at the end of the assignment to help you accomplish the task. Regular arithmetic operators are left to right while negative and power
operators are right to left. To get full marks, your system should accept multi character variables, multi digit numbers and work with doubles. Thus, 2.5 + 2 should produce 4.5 correctly. No need to distinguish between integers and real numbers, treat everything as double.
You can use std:stod function in C++ to convert a string to double.
Your program should read a complete line. In C++ you can use std:getline(std::cin, line); to read the line to the string variable line. Assignment shall not produce any output (not even newline). If the statement is just an expression, you shall print the result of it. The
output should only contain numbers followed by a new line. Your program should terminate if it receives ! as input.
You should use shunting yard algorithm to perform this task. You do not need to produce postfix output or AST. Simply perform the calculation. You can use any programming language that I will be able run in my system. These are C++, C, python, php (cli only), nodejs, and
haskell. Any attempt at cheating will result in 0 and most likely you will fail the course. Do as much as you can, partial points will be given. Just ensure your program is compiling and running, even if it produces wrong results. You may test your application with the following
input. The output you should produce is marked red. Your program should not crash during the entire run, it should keep asking for more input.
You should submit a single code file. I should be able to compile and run this single file by itself. If moodle does not allow your program extension, save it as text file and upload.
2+2
4
2+3*2
8
2+2*(3+2)+2
14
14-2^2
10
2^3^2
512
5+ 9
14
8*-4
-32
x=4
x+5
9
y = x + 2*x
y
12
my = x+y/2
my^2
100
!
Transcribed Image Text:In this assignment you are required to write a complete code execution system for the language given below. You must follow the guidelines to the letter, otherwise you may lose significant amount of points even if your program does the requested job. Your system should have two types of statements, variable assignment and expressions. In variable assignment, you will have variable name followed by = symbol which will be followed by a standard expression. Expressions can include variables, regular arithmetic operators (+, -, *, /), power operator (^) and parenthesis. Additionally, your system should support negative operator (-), a hint will be provided at the end of the assignment to help you accomplish the task. Regular arithmetic operators are left to right while negative and power operators are right to left. To get full marks, your system should accept multi character variables, multi digit numbers and work with doubles. Thus, 2.5 + 2 should produce 4.5 correctly. No need to distinguish between integers and real numbers, treat everything as double. You can use std:stod function in C++ to convert a string to double. Your program should read a complete line. In C++ you can use std:getline(std::cin, line); to read the line to the string variable line. Assignment shall not produce any output (not even newline). If the statement is just an expression, you shall print the result of it. The output should only contain numbers followed by a new line. Your program should terminate if it receives ! as input. You should use shunting yard algorithm to perform this task. You do not need to produce postfix output or AST. Simply perform the calculation. You can use any programming language that I will be able run in my system. These are C++, C, python, php (cli only), nodejs, and haskell. Any attempt at cheating will result in 0 and most likely you will fail the course. Do as much as you can, partial points will be given. Just ensure your program is compiling and running, even if it produces wrong results. You may test your application with the following input. The output you should produce is marked red. Your program should not crash during the entire run, it should keep asking for more input. You should submit a single code file. I should be able to compile and run this single file by itself. If moodle does not allow your program extension, save it as text file and upload. 2+2 4 2+3*2 8 2+2*(3+2)+2 14 14-2^2 10 2^3^2 512 5+ 9 14 8*-4 -32 x=4 x+5 9 y = x + 2*x y 12 my = x+y/2 my^2 100 !
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY