Project
Unit Converter
Medium
1057 completions
~ 15 hours
4.2Get comfortable with the basics of coding: loops, conditions, and data input and output.
Provided by
JetBrains Academy
About
When you travel, everything changes: people, languages, time zones, and even units. It may be difficult to read the temperature in Fahrenheit when you’ve always used Celsius, or to measure yourself in kilos if you’ve only used pounds. It’s no easy matter, though a nice unit converter could certainly help! In this project, you will write a converter that handles distance, weight, and temperature units – all the traveller’s essentials.
Training project
This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.
What you'll learn
Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Display simple conversion examples: for instance, a standard measurement table.
Teach your program to convert kilometers to meters.
Teach your program to handle other distance units - yards, feet and inches - and convert them to meters.
Now you can convert all distance units; time to enable your converter to work with weight measure units as well.
Your converter is only missing one thing: temperatures. Teach it to convert Fahrenheir, Celsius and Kelvin, and your ultimate unit converter is ready.
Reviews
2 weeks ago
I have learned problem solving methods while doing this project. Problems like errors, exceptions, breaking the loop on a condition etc.
Srinath Chintapalli
1 month ago
I have learned how useful a Enum can be and the importance of input validation. This could easily be made into an actual usable user-facing app.
I learned how to: Use Kotlin enums with custom properties and a companion object to encapsulate data (unit type, ratio, names, synonyms) and behavior (lookup by string) in a single, type‑safe structure. Model a domain with multiple categories using a secondary enum (UnitType) and connect t ...
4.2
Learners who completed this project within the Kotlin Core course rated it as follows: