Analyzing the problem domain
In this section, we will define the scope of the project and the technical challenges that we need to address.
Understanding and analyzing the problem domain is the first step in building any system. It is important to unambiguously articulate the problem we are trying to solve, and the boundaries of the system. These can be captured in the form of system requirements.
Let's look at the requirements for the CLI tool we are going to build.
The tool should accept an arithmetic expression as input, evaluate it, and provide the numerical output as a floating-point number. For example, the expression 1+2*3.2+(4/2-3/2)-2.11+2^4 should evaluate to 21.79.
The arithmetic operations in scope are addition (+), subtraction (-), multiplication (*), division (/), power (^), the negative prefix (-), and expressions enclosed in parentheses ().
Mathematical functions such as trigonometric and logarithmic functions, absolute, square roots, and so on...