- Exercises

Let's test our knowledge of literals with these exercises.

We'll cover the following

Exercise 1 #

Extend the MyDistance class we saw in the previous lesson to support the following units:

  • Feet: 1 ft = 0.3048m

  • Mile: 1 mi = 1609.344m

Choose good suffixes for these units.

Write an implementation below:

Get hands-on with 1400+ tech skills courses.