Question: using c++ Output: The distance between points is 5.65685 The area of point also The area of circt is 3.14159 The area of circ2 is

using c++
Output: The distance between points is 5.65685 The area of point also The area of circt is 3.14159 The area of circ2 is 12.5664 The distance between circle centers is 4.24264 Press any key to continue. B-) Define a Pet class that stores the pet's name, age, and weight. Add appropriate constructors, accessor, and mutator functions. Also define a function named getLifespan (The length of time for which a person or animal lives or a thing function) that returns a string with the value "Unknown lifespan." Next, define a Dor class that is derived from Pet. The Dor class should have a private member variable named breed that stores the breed of the dog. Add mutator and accessor functions for the breed variable and appropriate constructors, Redefine the getLifespan function to return "approximately 7 years" if the dog's weight is over 100 pounds and approximately 13 years if the dog's weight is under 100 pounds Next, define a Rock class that is derived from Pet. Redefine the getLifespan function to return thousands of years." Finally, write a test program that creates instances of pet rocks and pet dogs that exercises the Inherited and redefine functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
