Question: c++ please! Question 2 This is an exercise to get practice creating classes and using inheritance. No test plan is necessary . Each class must

c++ please!

Question 2

This is an exercise to get practice creating classes and using inheritance.

No test plan is necessary.

Each class must have its own .cpp and .h files.

Create Classes to implement the UML diagram below. (included at bottom of post)

All classes must have default constructors and a secondconstructor that sets all of its attributes.

When any Pet is constructed, it should output:

Im , my color is and Im happy to be your pet!

When the Dog class is asked to bark, it will output:

, the says: Bow Wow! Bow Wow!

When the Bird is asked to fly, it will output:

Yahoo! is flying feet with my wingspan of feet!

When the destructor for a pet is called, it should output:

is leaving now, sorry you didnt like my color of: . :-(

Each output should be on its own line.

Write a program to use pointers, allocation, and new to perform the following.

Create a dog named Lassie with breed of Collie color of Brown
Create a dog name Ruby, with a breed of Mixed with a color of silver
Change Rubys breed to Labrador
Change Rubys color to Chocolate
Create a bird named Tweety, with .6 ft wingspan and color Yellow
Create a bird named Donald Duck, with a 0 wingspan and color white
Change wingspan of Donald Duck to 1.5 feet.
Have Lassie bark
Have Ruby bark
Free Ruby and Lassie .
Have Tweety fly 250 ft.
Have Donald Duck fly 18 ft.
Free Donald Duck.
Cout
Return 0 from main.
End the program without freeing Tweety
Explain the final output, if any, regarding Tweety
 c++ please! Question 2 This is an exercise to get practice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!