Expression Evaluator Contest
Schedule / Deadline
Start Date: March 1st, 2005 [Tuesday]
End Date: March 31st, 2005 [Thursday]
If you choose to enter, please reply stating that you have entered the contest, and before the Contest deadline you must enter a submission that meets the stated requirements and send it to the submission officer via email or private message. E-mail is preferred.
PM: Stack Overflow
An expression evaluator reads in user inputted infix expression, and converts it to postfix. For the purpose, implements stack and queue abstract data types (ADT) using pointers. Each integer and operator is kept in specially designed token object to allow different data types to be held on the same data structures. Going through the steps of conversion involves checking the priority of the operator. After evaluation the stack contains one value - the final answer, which is given back to the user.
Create your own expression evaluator in pure C or C++. It must have a console-based interface.
Bonus [5 points]: Display the infix expression in reverse polish notation. For example, the expression 3 * (4 + 7) would be written as 3 4 7 + *.
Any expression in the standard form like "2*3-4/5" is an Infix (Inorder) expression.
The Postfix (Postorder) form of the above expression is "23*45/-".
The Prefix (Preorder) form of "(1 + 2) * 3" is "* 3 + 1 2" or "* + 1 2 3"
Below are the current contest rules and regulations.
I. Official Rules
I.I You may only submit one entry per contest, and it must have been submitted between the contest start and end dates.
I.II If you submitted your entry, you are permitted to re-enter your submission between the contest start and end dates.
I.III Entries submitted should be:
II. Judging Categories
- Substantially the developer's original design
- Substantially the developer's original programming
II.I Submitted code will be judged based on the following criteria:
Creativity (0 - 5)
Make your concept new, or give an old one a unique twist.
Compilation (0 - 5)
How clean the build process is.
Efficiency (0 - 5)
Dependant upon necessary or unnecessary resources used by your program.
Portability (0 - 5)
How well it compiles on multiple platforms.
Elegance (0 - 5)
The code's layout scheme and organization.
Best Code Score: 25 (Excluding Additional Bonus Points)
- Stack Overflow