class Annonse:
def __init__(self, annTekst):
self._annTekst = annTekst
self._budListe = []
def hentTekst(self):
return self._annTekst
def giBud(self, hvem, belop):
self._budListe.append(Bud(hvem, belop))
def antBud(self):
return len(self._budListe)
def hoyesteBud(self):
max = self._budListe[0]
for bud in self._budListe:
if bud.hentBudStr() > max.hentBudStr():
max = bud
return max