Creating the superclass to triangle and diamond