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
- 01
Set up the sbt project skeleton
~1hCreate a new sbt project with a main entry point and configure build.sbt with basic dependencies.
- 02
Implement conversion functions
~2hWrite pure functions for length, weight, temperature, and volume conversions using pattern matching on unit types.
- 03
Build the interactive CLI loop
~2hRead user input from StdIn in a loop, parse the requested conversion, and print the result.
- 04
Add input validation and error handling
~1.5hHandle malformed input and unsupported units gracefully with clear error messages.
- 05
Write unit tests
~2hCover 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.
Tech stack