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

35
cpp_module_00/Warlock.hpp Normal file
View File

@@ -0,0 +1,35 @@
#ifndef WARLOCK_HPP
# define WARLOCK_HPP
# include <iostream>
# include <string>
class Warlock {
private:
Warlock();
Warlock(Warlock const & other);
Warlock & operator=(Warlock const & other);
std::string name;
std::string title;
public:
Warlock(std::string const & name, std::string const & title) {
this->name = name;
this->title = title;
std::cout << this->name << ": This looks like another boring day.\n";
};
~Warlock() {
std::cout << this->name << ": My job here is done!\n";
};
std::string const & getName() const {return (this->name);};
std::string const & getTitle() const {return (this->title);};
void setTitle(std::string const & title) {this->title = title;};
void introduce() const {
std::cout << this->name << ": I am " << this->name << ", " << this->title << "!\n";
};
};
#endif