My name is Vasilis Naskos, I am a graduate of computer engineering and a passionate programmer. This site is my personal space where I like to post my projects, thoughts and things that I find interesting.

Math Expression Calculator


Math expression calculator as its name implies is a calculator which can evaluate mathematical expressions. It can handle addition, subtraction, multiplication, division, power, taking into account the order of operations. Using parentheses is also possible even if they are nested to each other.

The purpose of this project was to get my hands on the principles of modularity and portability. The logic is separated into modules, making the system easily extendable. The same code, with minor changes, can be ported to different systems. Furthermore, three main design patterns (composite, factory, interpreter) were introduced, in order to achieve the previously mentioned goals in an optimal way.


Github: https://github.com/vnaskos/oop-expression-calc


early build as proof of concept

1 comment for “Math Expression Calculator

  1. March 13, 2017 at 8:33 pm

    Thanks, great article.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.