Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Medicinale:
- def __init__(self,L):
- #@param L : list ([nome,disponibilita])
- self.L=L
- class Farmacia:
- def __init__(self,nome,tel,ind,med):
- #@param nome : string
- #@param tel : string (of integers)
- #@param ind : string (indirizzo della farmacia)
- #@param med : list (lista di oggetti di tipo Medicinale)
- self.nome=nome
- self.tel=tel
- self.ind=ind
- self.med=med
- def removeMed(self,medName):
- #@param medName : string
- for i in self.med:
- if self.med[i[0]]==medName:
- self.med.pop(i)
- def addMed(self,newMed):
- #@param newMed : Medicinale
- self.med.append(newMed)
- def getDisp(self,medName):
- #@param medName : string
- for i in self.med:
- if self.med[i[0]]==medName:
- return self.med[i[1]]
- class Farmacia_Notturna(Farmacia):
- def __init__(self,nome,tel,ind,med,orario):
- #@param nome : string
- #@param tel : string (of integers)
- #@param ind : string
- #@param med : list (of Medicinale objects)
- #@param orario : string
- Farmacia.__init__(self,nome,tel,ind,med)
- self.orario=orario
- def getSchedule(self):
- return self.orario
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement