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
When the Dog class is asked to bark, it will output:
When the Bird is asked to fly, it will output:
Yahoo!
When the destructor for a pet is called, it should output:
Each output should be on its own line.
Write a program to use pointers, allocation, and new to perform the following.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started