Starting from:

$35

Programming Assignment 8 Solution

 Overview

Over the past several weeks we have gotten quite familiar with the tree traversal application.  Currently, it can parse and execute simple math expressions using just the +, -, * and / operations.

For this assignment you must extend the application to support the power (^) and factorial (!) operations.  Clearly one is binary and the other unary (and on the right).  Make sure your application supports the proper order of operations for these operators.



## Grading Criteria

This assignment will be graded like the others, based on passing the Travis builds and the correctness of the behvior of the application.  Here are a couple of other things to keep in mind:

* If you commit, even once, to your repository, this will be considered a submission and will be graded.  No exceptions!  Only commit if you mean to!

* This assignment will count as an additional assignment grade.  It is not extra credit and it does not replace another assignment grade.

* Your solution must follow the patterns already established within the application.  You must use and extend the existing class structure to handle the new operations. 

* The new operations must be supported throughout the application, from the interpreter parsing the expression, to the generation of symbols, to all of the visitors.

## Beyond 100

You can earn even more points on this assignment.  These extra points on strictly on this assignment, and you must have completed the primary portion of the assignment before you can earn any bonus points.

Since getting bonus points requires extra capabilities, the graders need to be aware of which items you have implemented.  We will look at the last Git commit message before the deadline.  In that commit message clearly tell us which bonus items we should evaluate your application for.  You will be awarded either all or none of the points.  There is no partial credit for the extra credit.

Here we go:

* 20pts - add a "get" command to print out the current value of a variable.  Evaluated through trying the functionality in the application.

* 40pts - support floating point values in expressions and variables.  Evaluated through trying the functionality in the application.

* 40pts - support a command history.  Up arrow moves back through the history and forward arrow moves forward.  Make it easy to execute these commands again.


 REMINDERS:

* Ensure that your name, vunetid, email address, and the honor code appear in the header comments of all files that you have altered.

* Do not alter any of the project files unless explicitly directed otherwise!  Work only on those files specified above.  You must use the supplied `CMakeLists.txt` file as is.

* All students are required to abide by the CS 3251 coding standard, available on the course web page and provided to you on the first day of class. Points will be deducted for not following the coding standard.

* For full credit, your program must compile with a recent version of `clang` and run successfully with Travis CI.
  * Your code will be treated as if it failed to compile if you do not turn Travis builds on.
  * You will have to turn on Travis builds for your repository and then push to trigger a Travis build.
  * The Travis build *will* fail if your code is not properly formatted. **This is by design.** If your code is compiling and running successfully, but the build is failing, then your build is most likely failing because your code is not passing the linter. This can be confirmed by checking if a command involving `clang-format` in the Travis build output log has an exit code of 1.

* Your program(s) should always have an exit code of 0.  A non-zero exit code (generally indicative of a segmentation fault or some other system error) is reason to worry and must be corrected for full points.
  
* When submitting the assignment, all files that are provided to you, plus your solution files have been submitted. All files necessary to compile and run your program must reside in the GitHub.com repository.

More products