-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPhysicalMemory.cpp
More file actions
42 lines (33 loc) · 802 Bytes
/
Copy pathPhysicalMemory.cpp
File metadata and controls
42 lines (33 loc) · 802 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
40
41
#include "PhysicalMemory.h"
PhysicalMemory::PhysicalMemory(string type,MainMemory* RAM, StorageDevice* storageDevice )
: technology(type), RAM(RAM), storageDevice(storageDevice), capacity(RAM->getCapacity() + storageDevice->getCapacity()) {}
void PhysicalMemory::getSpecs() const
{
cout << "Physical Memory :" << technology << '\n';
RAM->getSpecs();
storageDevice->getSpecs();
}
MainMemory* PhysicalMemory::getRam() const
{
return RAM;
}
StorageDevice* PhysicalMemory::getStorage() const
{
return storageDevice;
}
int PhysicalMemory::getCapacity() const
{
return capacity;
}
string PhysicalMemory::getTechnology() const
{
return technology;
}
void PhysicalMemory::setTechnology(string value)
{
technology = value;
}
void PhysicalMemory::setCapacity(int value)
{
capacity = value;
}