implementing class motor giving all the atrbutes a motor is composed