blob: b2ef540a44af7570685ccdf277736afd2c6ddce1 (
plain)
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
|
/*
* File: Medicamento.cpp
* Author: mitsuo
*
* Created on 27 November 2022, 11:49
*/
#include <cstring>
#include "Medicamento.h"
#include "aux.h"
Medicamento::Medicamento() {
this->codigo = -1;
this->nombre = new char [MAXLEN];
}
Medicamento::Medicamento(const Medicamento& orig) {
}
Medicamento::~Medicamento() {
delete [] this->nombre;
}
void Medicamento::SetCantidad(int cantidad) {
this->cantidad = cantidad;
}
int Medicamento::GetCantidad() const {
return cantidad;
}
void Medicamento::SetNombre(const char* nombre) {
strcpy(this->nombre, nombre);
}
char* Medicamento::GetNombre() const {
return nombre;
}
void Medicamento::SetCodigo(int codigo) {
this->codigo = codigo;
}
int Medicamento::GetCodigo() const {
return codigo;
}
|