This program detects when any of the body vitals go out of limits. The purpose is to treat without delay.
- The code here has high complexity in a single function.
- The tests are not complete - they do not cover all conditions
- Reduce the cyclomatic complexity.
- Avoid duplication - functions that do nearly the same thing
- Complete the tests - cover all conditions.
- To treat, we need to know the abnormal vital and the breach - whether high or low. Add this capability.
- Add the ability to plug-in different reporters to this code.