Составить программу для формального исполнителя чертёжник результатом работы которой будет изображение ​


Составить программу для формального исполнителя чертёжник результатом работы которой будет изображен

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
safeer
02.07.2021 12:49

#include <iostream>

using namespace std;

class Building {

private:

 string adress_m;

 int storeyCount_m;

 bool quarantine_m;

public:

 Building(string adress = "", int count = -1) {

  adress_m = adress;

  storeyCount_m = count;

 }

 void addStoreys(int count) {

  storeyCount_m += count;

 }

 void quarantineOn() {

  cout << "Quarantine: on";

  cout << endl;

  quarantine_m = 1;

 }

 void quarantineOff() {

  cout << "Quarantine: off";

  cout << endl;

  quarantine_m = 0;

 }

 void quarantineCheck() {

  cout << "Quarantine: ";

  if(quarantine_m) {

   cout << "on";

   cout << endl;

  } else {

   cout << "off";

   cout << endl;

  }

 }

 string getAdress() {

  return adress_m;

 }

 int getStorey() {

  return storeyCount_m;

 }

};

int main() {

Building build("dirt house", 1);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

build.quarantineCheck();

build.quarantineOn();

build.addStoreys(2);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

}

0,0(0 оценок)
Ответ:
Ania151
02.07.2021 12:49

#include <iostream>

using namespace std;

class Building {

private:

 string adress_m;

 int storeyCount_m;

 bool quarantine_m;

public:

 Building(string adress = "", int count = -1) {

  adress_m = adress;

  storeyCount_m = count;

 }

 void addStoreys(int count) {

  storeyCount_m += count;

 }

 void quarantineOn() {

  cout << "Quarantine: on";

  cout << endl;

  quarantine_m = 1;

 }

 void quarantineOff() {

  cout << "Quarantine: off";

  cout << endl;

  quarantine_m = 0;

 }

 void quarantineCheck() {

  cout << "Quarantine: ";

  if(quarantine_m) {

   cout << "on";

   cout << endl;

  } else {

   cout << "off";

   cout << endl;

  }

 }

 string getAdress() {

  return adress_m;

 }

 int getStorey() {

  return storeyCount_m;

 }

};

int main() {

Building build("dirt house", 1);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

build.quarantineCheck();

build.quarantineOn();

build.addStoreys(2);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

}

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота