This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
from datetime import datetime | |
# --- ABSTRACCIÓN: define la interfaz común --- | |
class Persona(ABC): | |
def __init__(self, codigo, nombre): | |
self.__codigo = codigo # ENCAPSULAMIENTO: atributo privado | |
self.__nombre = nombre # ENCAPSULAMIENTO: atributo privado | |
def get_codigo(self): |