-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDRONE.CPP
55 lines (43 loc) · 1000 Bytes
/
DRONE.CPP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Drone.cpp: implementation of the CDrone class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "VarroaPop.h"
#include "Drone.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDrone::CDrone() {
age = 0;
number = 1;
}
CDrone::CDrone(int quantity) {
age = 0;
number = quantity;
}
CDrone::~CDrone()
{
}
CDrone::CDrone(CDrone* oldDrone) {
number = oldDrone->number;
age = oldDrone->age;
}
// assignment operator
CDrone& CDrone::operator=(const CDrone& theDrone) {
if(this == &theDrone) {
return *this;
}
// copy variables
number = theDrone.number;
age = theDrone.age;
return *this;
}
void CDrone::Serialize(CArchive& ar)
{
CBee::Serialize(ar);
}