Command-Line Unit & Currency Converter
Build a terminal tool that converts between common units (length, weight, temperature) and currencies using fixed exchange rates loaded from a local file. Learners practice Kotlin basics: functions, when-expressions, string parsing, and command-line argument handling.
- Estimate
- ~7.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
kotlinx-cli · Gradle
Project roadmap
- 01
Set up the Kotlin project
~1hInitialize a Gradle Kotlin project and add the kotlinx-cli dependency for argument parsing.
- 02
Define conversion data
~1.5hCreate data classes and maps holding conversion factors for length, weight, and temperature units.
- 03
Implement conversion logic
~2hWrite functions using when-expressions to perform the correct math for each unit pair.
- 04
Add currency conversion
~1.5hLoad a local JSON/properties file of fixed exchange rates and implement currency conversion using the same pattern.
- 05
Wire up CLI and polish
~1.5hParse command-line arguments, print formatted results, and handle invalid input gracefully.
Resources
- DocsKotlin Docs
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack