code Assignment using 
momento paterna nd factory.