-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLab3.cpp
27 lines (26 loc) · 829 Bytes
/
Lab3.cpp
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
#include "libs/3_host.hpp"
#include "libs/3_hub.hpp"
#include "libs/3_base_device.hpp"
int main()
{
host test_host(100.0);
adress_type empty_adress({});
test_host.add_device(empty_adress, new hub());
test_host.devices_list();
test_host.add_device(empty_adress, new base_device(base_device::mouse, 5));
test_host.devices_list();
test_host.add_device({0}, new base_device(base_device::printer, 10));
test_host.devices_list();
test_host.print_power();
test_host.switch_power({0});
test_host.devices_list();
test_host.switch_power({0, 0});
test_host.devices_list();
test_host.print_power();
test_host.switch_power({1});
test_host.devices_list();
test_host.print_power();
test_host.switch_power({0});
test_host.devices_list();
test_host.print_power();
}