33 lines
541 B
C++
33 lines
541 B
C++
/*
|
||
* Document.hpp
|
||
*
|
||
* Created on: 4 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include <iostream>
|
||
|
||
class Document
|
||
{
|
||
private:
|
||
std::string _name;
|
||
public:
|
||
Document(const std::string name) : _name(name)
|
||
{
|
||
}
|
||
void Open()
|
||
{
|
||
std::cout << "Документ " << _name << " открыт!" << std::endl;
|
||
}
|
||
void Paste()
|
||
{
|
||
std::cout << "Вставлено в документ " << _name << std::endl;
|
||
}
|
||
std::string getName() const
|
||
{
|
||
return _name;
|
||
}
|
||
};
|