Command-line unit converter
Convert temperatures and distances through explicit units, validated input, predictable rounding, and useful failure messages.
System boundary
The program receives a source unit, target unit, and numeric text from command-line arguments. It writes one converted value to standard output or one safe diagnostic to standard error and returns a documented exit status.
Milestones
- Write a conversion table and units before code.
- Parse one complete input without accepting trailing text.
- Separate conversion math from command-line formatting.
- Add help output and classified invalid-input failures.
Acceptance checks
- Known examples and inverse conversions agree within the declared rounding rule.
- Zero, negative values, decimals, and exact boundaries are tested.
- Unknown units, missing arguments, and nonnumeric input return nonzero.
- The README records runtime version, commands, and expected output.
- A second person can add one unit without changing the parser.
Extend it
Add data-size units with base-10 versus base-2 policy, then explain why a universal conversion formula would be misleading.