Reflect the fact that all gates are numbered. Add a constructor to Gate that takes an integer arguement to set the number/ID and change all other derived gates to pass the number to the base Gate.