KotlinbeginnercliAI generated

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

  1. 01

    Set up the Kotlin project

    ~1h

    Initialize a Gradle Kotlin project and add the kotlinx-cli dependency for argument parsing.

  2. 02

    Define conversion data

    ~1.5h

    Create data classes and maps holding conversion factors for length, weight, and temperature units.

  3. 03

    Implement conversion logic

    ~2h

    Write functions using when-expressions to perform the correct math for each unit pair.

  4. 04

    Add currency conversion

    ~1.5h

    Load a local JSON/properties file of fixed exchange rates and implement currency conversion using the same pattern.

  5. 05

    Wire up CLI and polish

    ~1.5h

    Parse command-line arguments, print formatted results, and handle invalid input gracefully.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~7.5h · 5 steps

Tech stack

kotlinx-cliGradle