-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGunFactory.cpp
More file actions
39 lines (29 loc) · 880 Bytes
/
GunFactory.cpp
File metadata and controls
39 lines (29 loc) · 880 Bytes
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
#include "GunFactory.h"
#include <Windows.h>
void GunFactory::setGunCaliber(double gunCaliber) {
this->gunCaliber = gunCaliber;
}
void GunFactory::setGunAmmoCapacity(int gunAmmoCapacity) {
this->gunAmmoCapacity = gunAmmoCapacity;
}
double GunFactory::getGunCaliber() {
return gunCaliber;
}
int GunFactory::getGunAmmoCapacity() {
return gunAmmoCapacity;
}
//ïåðåîïð print
void GunFactory::print() {
Factory::print();
cout << "Êàëèáð: " << gunCaliber << endl;
cout << "Êîëè÷åñòâî ïàòðîíîâ (âìåñòèìîñòü): " << gunAmmoCapacity << endl;
}
void GunFactory::produceGuns() {
cout << "(çâóêè âûñòðåëîâ...)";
for (int i = 0; i < 6; i++) {
Sleep(1000);
cout << ".";
}
cout << endl << "Íîâîå îðèæèå ïîñòóïàåò ñ êîíâåéåðà. Ó íèõ êàëèáð "
<< gunCaliber << " äþéìîâ è åìêîñòü áîåïðèïàñîâ " << gunAmmoCapacity << " ïóëü" << endl;
}