School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,18 @@
#include "house.h"
House::House(int constructionYear, bool isHistorical){
this->constructionYear = constructionYear;
this->isHistorical = isHistorical;
}
bool House::mustBeRestored(){
return (this->constructionYear < 1923);
}
bool House::canBeDemolished(){
return !this->isHistorical;
}
std::string House::toString(){
return "House built in: " + std::to_string(this->constructionYear) + " which is " + (this->isHistorical ? "" : "not ") + "historical.";
}