-
Notifications
You must be signed in to change notification settings - Fork 2
/
syrup.h
79 lines (50 loc) · 1.48 KB
/
syrup.h
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef _syrup_h_
#define _syrup_h_
#include "drug.h"
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
class Syrup : public Drug {
protected:
int _dose;
int _type_of_casing;
public:
Syrup(int const id,
string const name,
string const laboratory,
float const price,
float const pooling,
int const quantity,
int const stock,
int dose, int type_of_casing
);
~Syrup();
// START: gets and sets
virtual int getDose() const{ return _dose; };
virtual void setDose(int value){ _dose = value; };
virtual int getTypeOfCasing() const{ return _type_of_casing; };
virtual void setTypeOfCasing(int value){ _type_of_casing = value; };
// END: gets and sets
// START: methods
//void print();
//void write(std::ostream &out);
// END: methods
};
Syrup::Syrup(int const id,
string const name,
string const laboratory,
float const price,
float const pooling,
int const quantity,
int const stock,
int dose,
int type_of_casing) : Drug(id, name, laboratory, price,
pooling,
quantity, stock) {
setDose(dose);
setTypeOfCasing(type_of_casing);
// ToDo -> ERROR -> Drug::setMeasure_unit("comprimido(s)");
//Drug::_measure_unit = "comprimido(s)";
}
#endif