Header file:
#ifndef NAME_H
#define NAME_H
#include <string>
class Name {
private:
std::string first;
std::string father;
std::string family;
public:
Name();
Name(const std::string& first, const std::string& father, const std::string& family);
std::string getFirst() const;
std::string getFather() const;
std::string getFamily() const;
};
#endif
Implementation file:
#include "Name.h"
Name::Name() : first(""), father(""), family("") {}
Name::Name(const std::string& first, const std::string& father, const std::string& family) : first(first), father(father), family(family) {}
std::string Name::getFirst() const {
return first;
}
std::string Name::getFather() const {
return father;
}
std::string Name::getFamily() const {
return family;
}