# [CALC1] A simple calculator

The specifications are quite trivial …

## The product we need

For this demo, a simple calculator is used. It should work with integers; and has only a few requirements. See below. |

We use this extremely simplistic example as you will agree on its requirements.

## Some general requirements, for all calculators

All calculators should be able to sum two numbers and show the result. |

All calculators should be able to subtract a number form another number. |

All calculators should be able to multiply two numbers. |

All calculators should be able to divide two numbers. |

## Add this is how we test it

As we have defined only general requirements, we only need some generic tests.

Sum two numbers and verify the result is correct. By example: Add |

Add the numbers |

Feed two numbers to the calculators, in the right order and verify the result.
Subtract `5` from`7` and check the result is**2**Subtract `5555` from`7777` and check the result is**2222**
Note Here we specify two test in one test-requirement; just to show another style |

You get the idea … |

## Experience practice

There are several kinds of ‘needs’.

Here we use the toplevel Demonstrator (as it is not a real product), Requirement and Test_Case; later we will introduce Specification too. More kinds & levels can be configured.Every ‘need’ should have an unique and stable ID; this label is used to link other ‘needs’.

Some ‘needs’ are linked to an “earlier/higher” ‘need’.

You can see such an outgoing-link in e.g the requirements (You might need to “open” the details-row)Each outgoing-link will automatically result in an incoming-link on the references need. (Again, open the details-row, to be able to “follow” it in the ‘forward’ direction).

Hint

This article uses ‘sphinx-doc’ with the ‘needs’ plugin to define requirement. This is a text-based (and so version-controllable) tool; therefore it is painless to show the details of how it works; that is done in Particulars for CALC1

## Comments

comments powered by Disqus