This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
L3GestionParking/src/m/ListeTypePlace.py

26 lines
503 B
Python

from src.m.TypePlace import TypePlace
__author__ = 'sidya'
class ListeTypePlace:
"""
Classe qui permet de définir une liste de type de place par niveau pour la création d'un parking
"""
def __init__(self):
self.l = []
def add(self, h, l, nb):
self.l.append(TypePlace(h, l, nb))
@property
def nbPlaceTotal(self):
i = 0
for t in self.l:
i += t.nb
return i
@property
def liste(self):
return self.l