-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass.cpp
More file actions
98 lines (83 loc) · 2.34 KB
/
Copy pathclass.cpp
File metadata and controls
98 lines (83 loc) · 2.34 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include "class.h"
#include <QDebug>
#include <mainwindow.h>
#include <QTime>
baseComputer::baseComputer(int cpu, int ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("0");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
}
officeComputer::officeComputer(int cpu,int ram,QString display,QString printer)
:baseComputer(cpu, ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("1");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
this->display=display;
this->printer=printer;
}
QString officeComputer::get_display(){
return this->display;
}
QString officeComputer::get_printer(){
return this->printer;
}
lectureComputer::lectureComputer(int cpu, int ram, QString display, QString projector)
:baseComputer(cpu, ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("2");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
this->display=display;
this->projector=projector;
}
QString lectureComputer::get_display(){
return this->display;
}
QString lectureComputer::get_projector(){
return this->projector;
}
programmingComputer::programmingComputer(int cpu,int ram,QString display)
:baseComputer(cpu, ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("3");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
this->display=display;
}
QString programmingComputer::get_display(){
return this->display;
}
graphicComputer::graphicComputer(int cpu,int ram,QString display,QString gpu)
:baseComputer(cpu, ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("4");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
this->display=display;
this->gpu=gpu;
}
QString graphicComputer::get_display(){
return this->display;
}
QString graphicComputer::get_gpu(){
return this->gpu;
}
server::server(int cpu,int ram,QString ups)
:baseComputer(cpu, ram){
QString str = QString::number(QTime::currentTime().msecsSinceStartOfDay());
str.append("5");
this->id = str.toInt();
this->cpu=cpu;
this->ram =ram;
this->ups=ups;
}
QString server::get_ups(){
return this->ups;
}