d04 ex02 change pour pouvoir effectuer le test de erlazo
This commit is contained in:
@@ -2,23 +2,24 @@
|
||||
# define ANIMAL_HPP
|
||||
|
||||
# include "color.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include "Brain.hpp"
|
||||
|
||||
class Animal {
|
||||
|
||||
public:
|
||||
|
||||
Animal();
|
||||
Animal( Animal const & src );
|
||||
virtual ~Animal( void );
|
||||
Animal & operator=( Animal const & rhs );
|
||||
virtual Animal & operator=( Animal const & rhs );
|
||||
|
||||
virtual void makeSound() const = 0;
|
||||
std::string getType() const;
|
||||
|
||||
protected:
|
||||
virtual Brain * getBrain() const = 0;
|
||||
|
||||
protected:
|
||||
std::string type;
|
||||
|
||||
};
|
||||
|
||||
@@ -15,14 +15,17 @@ public:
|
||||
Cat();
|
||||
Cat( Brain *brain );
|
||||
// Cat( Brain *brain = new Brain() );
|
||||
Cat( std::string ideas );
|
||||
Cat( Cat const & src );
|
||||
~Cat();
|
||||
Cat & operator=( Cat const & rhs );
|
||||
Cat & operator=( Animal const & rhs );
|
||||
|
||||
void makeSound() const;
|
||||
|
||||
void printBrain() const;
|
||||
void printBrain(int pos) const;
|
||||
Brain * getBrain() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ public:
|
||||
Dog( Dog const & src );
|
||||
~Dog();
|
||||
Dog & operator=( Dog const & rhs );
|
||||
Dog & operator=( Animal const & rhs );
|
||||
|
||||
void makeSound() const;
|
||||
Brain * getBrain() const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user