feat(cmat): Completed Ex61 Part 2
This commit is contained in:
+31
-28
@@ -1,28 +1,31 @@
|
||||
|
||||
|
||||
#ifndef Person_h
|
||||
#define Person_h
|
||||
|
||||
#include <string>
|
||||
|
||||
class Person {
|
||||
public:
|
||||
virtual ~Person();
|
||||
|
||||
static int GetCount();
|
||||
|
||||
Person(std::string name, int age);
|
||||
|
||||
void setSalary(int sal);
|
||||
|
||||
private:
|
||||
Person(const Person &);
|
||||
|
||||
std::string name;
|
||||
int age;
|
||||
int salary;
|
||||
|
||||
static int Count;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef Person_h
|
||||
#define Person_h
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class Person {
|
||||
public:
|
||||
virtual ~Person();
|
||||
|
||||
static int GetCount();
|
||||
|
||||
Person(std::string name, int age);
|
||||
|
||||
void setSalary(int sal);
|
||||
|
||||
static std::shared_ptr<Person> GetPerson(std::string name, int age);
|
||||
|
||||
private:
|
||||
Person(const Person &);
|
||||
|
||||
std::string name;
|
||||
int age;
|
||||
int salary;
|
||||
|
||||
static int Count;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user