HackerRank Challenge – Find out the area of a rectangle using C++ inheritance

Rectangle Area HackerRank Challenge

..and a bit longer version.