C++ Logo

Overview

November 2024 - December 2024

The Expression Evaluator is a powerful C++ parser that processes arithmetic and logical expressions efficiently. It was developed as a school project to explore multiple approaches to polymorphism, with a focus on using operator overloading as the chosen method. The tool supports parentheses, operator precedence, and various mathematical operations using the Shunting-Yard algorithm and postfix evaluation.

Features

  • Parses and evaluates complex mathematical expressions.
  • Supports addition, subtraction, multiplication, division, and exponentiation.
  • Handles parentheses for correct precedence.
  • Implements infix-to-postfix conversion using the Shunting-Yard algorithm.
  • Optimized for performance with stack-based evaluation.
  • Provides meaningful error messages for invalid expressions.

Technologies Used

Programming Language: C++

Algorithm: Shunting-Yard, Postfix Evaluation

Data Structures: Stack, Queue

Challenges Faced

The biggest challenge was understanding the compact, pre-written codebase provided by the instructor. It was my first time working with polymorphism on a large-scale project, and I had to extend the existing structure using operator overloading while maintaining the original logic and design. This experience pushed me to think critically and read complex C++ code more confidently.

Repository Access

This was a school project, so the repository is private. If you're interested in viewing the code, feel free to email me and I’ll be happy to share access.