ScalabeginnercliAI generated

Command-Line Unit Converter

Build a console application that converts between units of length, weight, temperature, and volume. Learners practice Scala basics: pattern matching, functions, and reading command-line input.

Estimate
~8.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

sbt · ScalaTest

Project roadmap

  1. 01

    Set up the sbt project skeleton

    ~1h

    Create a new sbt project with a main entry point and configure build.sbt with basic dependencies.

  2. 02

    Implement conversion functions

    ~2h

    Write pure functions for length, weight, temperature, and volume conversions using pattern matching on unit types.

  3. 03

    Build the interactive CLI loop

    ~2h

    Read user input from StdIn in a loop, parse the requested conversion, and print the result.

  4. 04

    Add input validation and error handling

    ~1.5h

    Handle malformed input and unsupported units gracefully with clear error messages.

  5. 05

    Write unit tests

    ~2h

    Cover each conversion function and edge cases with ScalaTest.

Resources

Ready to build this?

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

~8.5h · 5 steps

Tech stack

sbtScalaTest