Exercise: CRTP Add Class
Test your understanding of CRTP classes.
We'll cover the following
Problem statement
We saw the code of the comparison operator in the previous lesson. In this lesson, you need to add another class called Person
. The Person
should have a first and last name. Then, create two objects of the Person
class and compare them using relational operations. This should be a lexicographic comparison based on the person’s full name.
Coding exercise
Write your code in the coding playground below.
Get hands-on with 1400+ tech skills courses.