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.
That is because the Display method of your derived class is being called twice. Instead, Display() of base class has to be called followed by Display() of derived. Are you using virtual by any chance? The main() is taking care of that already
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Rectangle Area
You are viewing a single comment's thread. Return to all comments →
That is because the Display method of your derived class is being called twice. Instead, Display() of base class has to be called followed by Display() of derived. Are you using virtual by any chance? The main() is taking care of that already