24 namespace AbstractFactory {
33 std::cout <<
"Hi, there. What's your name?" << std::endl;
34 std::getline(std::cin, result.
Name);
35 std::cout <<
"Great! And what's your department?" << std::endl;
37 std::cout <<
"All right. One final question: what's your salary?" << std::endl;
double Salary
Stores the employee's monthly wage.
Employee Create() final
Instructs this factory to create a value.
std::string DepartmentName
Stores the name of the employee's department.
std::string Name
Stores the person's name.
A data structure that represents an employee's data.
Concrete stdin input based factory.