Animal, Dog and Cat classes created and finished
This commit is contained in:
@@ -40,3 +40,8 @@ void Animal::makeSound() const
|
||||
{
|
||||
std::cout << "Animal weird sounds..." << std::endl;
|
||||
}
|
||||
|
||||
std::string Animal::getType() const
|
||||
{
|
||||
return (this->type);
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
class Animal
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
std::string type;
|
||||
public:
|
||||
Animal();
|
||||
@@ -26,7 +26,8 @@ class Animal
|
||||
Animal(const Animal &other);
|
||||
Animal& operator=(const Animal &other);
|
||||
|
||||
virtual void makeSound() const;
|
||||
virtual void makeSound() const;
|
||||
std::string getType() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user