previous | index | next

Virtual Methods

Q: What would be the output of the same program:
    Item item = new OxfordShirtInfo(49.99, "Navy blue", 15, 33);
    item->display();
    item = new ChinoInfo(69.99, "Khaki", 36, 34, false);
    item->display();
if the virtual keyword was missing from ItemInfo?

A:


previous | index | next