one implementation of the exam

This commit is contained in:
hugogogo
2022-12-01 15:47:19 +01:00
parent 16dcd06da6
commit c91d23a5d4
43 changed files with 925 additions and 0 deletions

45
cpp_module_01/ASpell.hpp Normal file
View File

@@ -0,0 +1,45 @@
#ifndef ASPELL_HPP
# define ASPELL_HPP
# include <iostream>
# include <string>
class ATarget;
class ASpell {
private:
std::string name;
std::string effects;
public:
ASpell() {
};
ASpell(ASpell const & other) {
*this = other;
};
ASpell & operator=(ASpell const & other) {
this->name = other.name;
this->effects = other.effects;
return (*this);
};
ASpell(std::string const & name, std::string const & effects) {
this->name = name;
this->effects = effects;
};
virtual ~ASpell() {
};
std::string const & getName() const {
return (this->name);
};
std::string const & getEffects() const {
return (this->effects);
};
void launch(ATarget const & atarget) const;
virtual ASpell * clone() const = 0;
};
#include "ATarget.hpp"
#endif