-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGPU.cpp
More file actions
40 lines (33 loc) · 1.03 KB
/
GPU.cpp
File metadata and controls
40 lines (33 loc) · 1.03 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
// Tyeon Ford
// GPU stuff
#include "GPU.h"
#include <iostream>
#include <iomanip>
using namespace std;
// GPU constructor
GPU::GPU(string name, double price, int stock, string desc, int vramAmount, string chip, int clock, string mfg)
: Product(name, price, stock, desc), vram(vramAmount), chipset(chip), coreClock(clock), brand(mfg) {}
void GPU::displayDetails() const {
cout << "\n===== GPU DETAILS =====\n";
cout << "Name: " << name << "\n";
cout << "Price: $" << fixed << setprecision(2) << price << "\n";
cout << "Stock: " << stock << " units\n";
cout << "Description: " << description << "\n";
cout << "VRAM: " << vram << "GB\n";
cout << "Chipset: " << chipset << "\n";
cout << "Core Clock: " << coreClock << " MHz\n";
cout << "Brand: " << brand << "\n";
cout << "=======================\n";
}
int GPU::getVRAM() const {
return vram;
}
string GPU::getChipset() const {
return chipset;
}
int GPU::getCoreClock() const {
return coreClock;
}
string GPU::getBrand() const {
return brand;
}