How to declare a Class Employee in C++.
How to declare a Class Employee in C++.
Example.
#ifndef EMPLOYEE_Sched
#define EMPLOYEE_Sched
#include <string>
using std::string;
namespace SavitchEmployees
{
class Employee
{
public:
Employee( );
Employee(const string& theName, const string& theSsn);
string getName( ) const;
string getSurname( ) const;
double getNumHealth( ) const;
private:
string name;
string surname ;
double NumHeakth;
};
}
#endif //EMPLOYEE_Sched
#c++ #class #programming #linux #unix
Example.
#ifndef EMPLOYEE_Sched
#define EMPLOYEE_Sched
#include <string>
using std::string;
namespace SavitchEmployees
{
class Employee
{
public:
Employee( );
Employee(const string& theName, const string& theSsn);
string getName( ) const;
string getSurname( ) const;
double getNumHealth( ) const;
private:
string name;
string surname ;
double NumHeakth;
};
}
#endif //EMPLOYEE_Sched
#c++ #class #programming #linux #unix
Commenti
Posta un commento