Academic help online

Consider the following code fragment:
class Object
{ public: virtual void printMe() = 0; };
class Place : public Object
{ public: virtual void printMe() { cout << “Buy it.\n”; } };
class Region : public Place
{ public: virtual void printMe() { cout << “Box it.\n”; } };
class State : public Region
{ public: virtual void printMe() { cout << “Ship it.\n”; } };
class Maryland : public State
{ public: virtual void printMe() { cout << “Read it.\n”; } };
int main() { Region* mid = new State;
State* md = new Maryland;
Object* obj = new Place;
Place* usa = new Region;
md−>printMe();
mid−>printMe();
(dynamic cast<Place*>(obj))−>printMe();
obj = md;
(dynamic cast<Maryland*>(obj))−>printMe();
obj = usa;
(dynamic cast<Place*>(obj))−>printMe();
usa = md;
(dynamic cast<Place*>(usa))−>printMe();
return EXIT SUCCESS;
}
What is the output from calling the main function of the Maryland class?

All Rights Reserved, usbestwriters.com
Disclaimer: You will use the product (paper) for legal purposes only and you are not authorized to plagiarize. In addition, neither our website nor any of its affiliates and/or partners shall be liable for any unethical, inappropriate, illegal, or otherwise wrongful use of the Products and/or other written material received from the Website. This includes plagiarism, lawsuits, poor grading, expulsion, academic probation, loss of scholarships / awards / grants/ prizes / titles / positions, failure, suspension, or any other disciplinary or legal actions. Purchasers of Products from the Website are solely responsible for any and all disciplinary actions arising from the improper, unethical, and/or illegal use of such Products.