Exercise: Polymorphism
Test your understanding of polymorphism.
We'll cover the following
Question
As we know now, polymorphism can be implemented in several ways. In the code given below, try to implement it using if
, switch
, and hash tables. Your code should call the appropriate function based on the possible value of the MessageSeverity
enum class.
Get hands-on with 1400+ tech skills courses.