-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtelephone.cpp
39 lines (30 loc) · 1.06 KB
/
telephone.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
28
29
30
31
32
33
34
35
36
37
38
39
//
// Created by bygra on 29.12.2022.
//
#include<iostream>
#include "telephone.h"
#include"device.h"
Telephone::Telephone(int batteryLife, std::string connection) : Device(batteryLife), _connection(connection)
{
}
Telephone::Telephone(std::string connection): _connection(connection)
{
}
void Telephone::Show()
{
std::cout << "Время работы аккумулятора = " << _batteryLife << std::endl << "Мобильная связь = " << _connection << std::endl;
}
Samsung::Samsung(int batteryLife, std::string connection) : Device(batteryLife), Telephone(connection)
{
}
void Samsung::Show()
{
std::cout << "Время работы аккумулятора = " << _batteryLife << std::endl << "Мобильная связь = " << _connection << std::endl;
}
Nokia::Nokia(int batteryLife, std::string connection) : Device(batteryLife), Telephone(connection)
{
}
void Nokia::Show()
{
std::cout << "Время работы аккумулятора = " << _batteryLife << std::endl << "Мобильная связь = " << _connection << std::endl;
}