How do I translate a definition for inheritance (computer science)? I'm trying to say this in Chinese:


  Inheritance allows for reuse of code where common behavior is defined
  once for a number of related classes and unique behavior is
  implemented only in classes where the behavior is different.


but this seems not very accurate:


  继承允许代码的重用，一些相关联的类中共同的行为只被定义一次，具有唯一性的行为只在类之间的行为不同的地方实现。


this is a single English sentence, but it difficult to translate to Chinese
anybody can help?
继承实现了代码的重用，即相关的类的相同行为被实现一次，不同的行为被单独实现。