-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mammal.cpp
29 lines (24 loc) · 819 Bytes
/
Mammal.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "Mammal.h"
Mammal::Mammal(std::string skin) : Animal()
{
}
//Get information needed. Fill in the class specific variables. and pass on the other variables into the animal class.
Mammal::Mammal(std::string skin, std::string animalType, double length, double weight, double lifespan, std::string sound,std::string name)
:Animal(animalType,length,weight,lifespan,sound,name)
{
mSkin = skin;
}
std::string Mammal::get_skin()
{
return mSkin;
}
void Mammal::print()
{
std::cout << this->get_name() <<std::endl
<< this->get_type() <<std::endl
<< this->get_length() <<std::endl
<<this->get_weight() << std::endl
<<this->get_lifespan() <<std::endl
<<this->get_sound() <<std::endl
<<this->mSkin<<std::endl <<std::endl;
}