Question
IN C++ HW_2B - Animal Bird Mammal (Bird and Mammal classes derive from Animal class) 7 files: Animal.h - Bird.h - Mammal.h - Source.cpp Animal.cpp
IN C++
HW_2B - Animal Bird Mammal (Bird and Mammal classes derive from Animal class)
7 files: Animal.h - Bird.h - Mammal.h - Source.cpp Animal.cpp - Bird.cpp - Mammal.cpp 1.) Write a program that produces the following output:
// ==== OUTPUT: ==== Birds are vertebrates in the Aves class. This pelican has gray feathers and weighs 8.5 pounds.
Mammals are vertebrates in the Mammalia class. This black and white dairy cow weighs 500 pounds.
Press any key to continue . . . */ ___________________________________________________________________________________________________
2.) Use the following UML class diagram to specify the 3 classes.
Note: Both Animal and Bird classes have a showAnimal method. Which method gets called depends on the calling object.
In main() . . . 1.) Declare a Bird object named: bird - Pass these values to the constructor: The feathers are gray and weight is 8.5.
2.) Declare a Mammal object named: cow - Pass these values to the constructor: Hair color is black and white and weight is 8.5.
3.) Each object should call its showAnimal function.
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