We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I had thought about adding validations into my code but decided to wait until I got a response on the tests. Amazingly enough, the code passed without the validations. Obviously the unit tests are not enforcing the data constraints proscribed in the requirements. In my opinion, this is a deficiency in the example. That said, I thought this was a nice, little exercise in C++ OOP and polymorphism.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Virtual Functions
You are viewing a single comment's thread. Return to all comments →
I had thought about adding validations into my code but decided to wait until I got a response on the tests. Amazingly enough, the code passed without the validations. Obviously the unit tests are not enforcing the data constraints proscribed in the requirements. In my opinion, this is a deficiency in the example. That said, I thought this was a nice, little exercise in C++ OOP and polymorphism.