...

/

Exercise: Extending Data Type Categorization Using Traits

Exercise: Extending Data Type Categorization Using Traits

Test your understanding of the trait idiom.

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

Access this course and 1400+ top-rated courses and projects.