-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicsCard.h
More file actions
31 lines (29 loc) · 819 Bytes
/
GraphicsCard.h
File metadata and controls
31 lines (29 loc) · 819 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
#pragma once
#include <iostream>
using namespace std;
class GraphicsCard {
private:
string brand;
int memorySize;
double price;
public:
GraphicsCard(const string& br = "", int size = 0)
: brand(br), memorySize(size) {
price = memorySize * 100;
}
GraphicsCard(GraphicsCard& obj)
{
brand = obj.memorySize;
memorySize = obj.memorySize;
price = obj.price;
}
// Getters and setters
string getBrand() const { return brand; }
void setBrand(const string& br) { brand = br; }
int getMemorySize() const { return memorySize; }
void setMemorySize(int size) { memorySize = size;
price = memorySize * 100;
}
double getPrice() const { return price; }
void setPrice(double pr) { price = pr; }
};