18 lines
436 B
C++
18 lines
436 B
C++
#include <greeter.h>
|
|
|
|
using namespace greeter;
|
|
|
|
Greeter::Greeter(std::string _name) : name(_name) {}
|
|
|
|
std::string Greeter::greet(LanguageCode lang) const {
|
|
switch (lang) {
|
|
case LanguageCode::EN:
|
|
return "Hello, " + name + "!";
|
|
case LanguageCode::DE:
|
|
return "Hallo " + name + "!";
|
|
case LanguageCode::ES:
|
|
return "¡Hola " + name + "!";
|
|
case LanguageCode::FR:
|
|
return "Bonjour " + name + "!";
|
|
}
|
|
}
|