#include <iostream>
using namespace std;

class building {
protected:
	int floorCount;
	int roomCount;
	int totalArea;
};

class house : public building {
	int bedroomCount;
	int bathroomCount;
public:
	house(int f,int r, double ft, int br, int bth){
		floorCount = f;
		roomCount = r;
		totalArea = ft;
		bedroomCount = br;
		bathroomCount = bth;
	}
	void show() {
		cout << "階数: " << floorCount << "\n";
		cout << "部屋数: " << roomCount << "\n";
		cout << "床の総面積: " << totalArea << "\n";
		cout << "寝室数: " << bedroomCount << "\n";
		cout << "浴室数: " << bathroomCount << "\n";
	}
};

class office : public building {
	int fireExtinguisherCount;
	int telephoneCount;
public:
	office(int f, int r, double ft, int p, int ext){
		floorCount = f;
		roomCount = r;
		totalArea = ft;
		telephoneCount = p;
		fireExtinguisherCount = ext;
	}
	void show() {
		cout << "階数: " << floorCount << "\n";
		cout << "部屋数: " << roomCount << "\n";
		cout << "床の総面積: " << totalArea << "\n";
		cout << "電話機の台数" << telephoneCount << "\n";
		cout << "消火器の台数" << fireExtinguisherCount << "\n";
	}
};

int main()
{
	house h_ob(2,12,5000,6,4);
	office o_ob(4,25,12000,30,8);
	
	cout << "家:\n";
	h_ob.show();
	
	cout << "\n会社:\n";
	o_ob.show();
	
	return 0;
}