summer_course_2024/city_model_structure/building_unit.py

49 lines
1.0 KiB
Python
Raw Normal View History

2020-10-13 14:47:01 -04:00
"""
Building module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from builtins import float
from city_model_structure.city_object import CityObject
class BuildingUnit(CityObject):
"""
BuildingUnit class
"""
def __init__(self, number_of_rooms, floor_area, energy_certificate):
"""
Constructor
"""
self._number_of_rooms = number_of_rooms
self._floor_area = floor_area
self._energy_certificate = energy_certificate
@property
def number_of_rooms(self):
"""
Get building unit number of rooms
:return: number of rooms
"""
return self._number_of_rooms
@property
def floor_area(self):
"""
Building unit floor area in square meters
:return: float
"""
return self._floor_area
@property
def energy_certificate(self):
"""
Building unit energy certificate
:return: energy_certificate
"""
#TODO: This is still not used, check in the future
return self._energy_certificate