class Strom(object):
    def __init__(self, n=None, m=None, H=None, cp=None, T=None, p=None,
                 k=[], f=[], cpL = [], kompN = [], kompM = [], kompHf = [], kompHv=[]):
        attrList = ['n', 'm', 'H', 'cp', 'T', 'p',
                    'k', 'f', 'cpL', 'kompN', 'kompM', 'kompHf', 'kompHv']
        for attr in attrList:
            setattr(self,attr, eval(attr))

        for komp in k:
            setattr(self,komp,Komponent)

    def set_f(self,f):
        self.f = f
        for i in range(len(f)):
            setattr(getattr(self,self.k([i])),f[i])


class Komponent(object):
    def __init__(self, n=None, m=None, H=None, cp=None, p=None):
        attrList = ['n','m', 'H', 'cp', 'p']
        for attr in attrList:
            setattr(self,attr, eval(attr))
            setattr(self,attr,property())

        self.n = 10

    def set_n(self,n):
        return n

    def get_n(self,n):
        return n
