Класс Screen - Nero-ro/Facade GitHub Wiki

Класс Screen

Класс Screen содержит следующие методы:

  • up()
  • down()
  • toString()

Полный код Класса Screen (.h):


#ifndef SCREEN_H

#define SCREEN_H

#include

#include

using namespace std;

class Screen

{

private:

QString description;

public:

Screen(QString description);
void up();
void down();
QString toString();

};

#endif // SCREEN_H


2 Часть (.cpp):


#include "screen.h"

Screen::Screen(QString description)

{

this->description = description;

}

void Screen::up() {

cout << description.toStdString() << " going up" << endl;

}

void Screen::down() {

cout << description.toStdString() << " going down" << endl;

}

QString Screen::toString() {

return description;

}


⚠️ **GitHub.com Fallback** ⚠️