Advertisement
GastonPalazzo

Coche

Sep 20th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. class Vehiculo:
  2.     #att
  3.     nI='No ingresado'
  4.  
  5.     #const
  6.     def __init__(self, matricula=nI, modelo=nI, color=nI, marca=nI):
  7.         self.__matricula=matricula
  8.         self.__modelo=modelo
  9.         self.__color=color
  10.         self.__marca=marca
  11.  
  12.     #meth
  13.         #exclusivos
  14.  
  15.         #gett & sett
  16.     def getMatricula(self):
  17.         return self.__matricula
  18.     def getModelo(self):
  19.         return self.__modelo
  20.     def getColor(self):
  21.         return self.__color
  22.     def getMarca(self):
  23.         return self.__marca
  24.  
  25.     def setMatricula(self, nuevaMatricula):
  26.         self.__matricula=nuevaMatricula
  27.     def setModelo(self, nuevoModelo):
  28.         self.__modelo=nuevoModelo
  29.     def setColor(self, nuevoColor):
  30.         self.__color=nuevoColor
  31.     def setMarca(self, nuevaMarca):
  32.         self.__marca=nuevaMarca
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement