C++ programming assignment help
$10-30 USD
货到付款
This assignment exercises the programming skills developed in CMPSC 121. One small portion will be manipulating an array of characters; the larger portion will require mutually recursive functions.
Some of the interfaces are defined in this assignment already (and must be followed); others will need to be designed and implemented.
PROBLEM DESCRIPTION
Most people would have a similar interpretation of the following expression:
9 - 6 * ( 2 + 8 / 4 ) - 1 + 3 * 7 % 5
The parentheses enforce an explicit order of operations (the contents must be evaluated before its value can be used). The other operators are also assumed to have a precedence: the multiplication and division operators occur before addition and subtraction, and operators in the same category are evaluated from left to right.
The purpose of this assignment is to develop a program that will evaluate expressions such as this, with the same results. Later in the semester, this course will introduce various data structures to help this problem, but for now, recursive functions will be applied, since each function call has its own memory to record what it needs to know.
COMPONENT FILES
Header Files (.h) provide declarations to be used by other parts of a large project. Generally these header files also have Source files (.cpp) that provide the implementation for functions whose prototypes appear in the header file.
After this assignment, header files will also declare classes, to allow for calling the methods within those classes. This assignment, however, simply includes function declarations.
This assignment divides the problem into two distinct parts -- a scanning part (tokenize) to understand the character text of the expression and break it up into individual values and operators (i.e. tokens); and an evaluation part that will understand how all the tokens combine to compute a value.
Later assignments will improve upon one part or the other; the division is begun here to avoid having to divide later.
tokenize.h Declares tokenizing functions
DO NOT CHANGE
[url removed, login to view] Understands tokens
Complete and submit
evaluate.h Declares evaluate function
DO NOT CHANGE
[url removed, login to view] Evaluates a tokenized expression
Most of the work will be within this file, and
will requires a set of mutually recursive functions.
Complete and submit
[url removed, login to view] Some code to test the expression evaluation
Feel free to edit as desired, but do not submit.
A very different version of this file will be used for grading.
The files to be submitted for this assignment are [url removed, login to view] and evaluate.cpp.
A makefile is also provided so that the make utility in Linux or Unix can be used to compile this program. This essentially serves the same purpose as the Visual Studio Solution, which describes all the components of a project, but also has some other features that can accelerate program development.
项目ID: #7021625
关于项目
授予:
Just give me the job and get it done! I'm a very experienced C++ developer. Enjoy life while I'm doing the work for you.