Exercise: Extending Data Type Categorization Using Traits

Test your understanding of the trait idiom.

We'll cover the following

Problem statement

The code below is from the trait lesson and represents each type to which the primary type category belongs. Each data type is in precisely one primary type category. Extend the program to find a value for each type category.

Coding exercise

Get hands-on with 1200+ tech skills courses.