Take the 2-minute tour ×
Chinese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Chinese language. It's 100% free, no registration required.

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?

share|improve this question
1  
Kevin, I wasn't the one who downvoted you but I have a couple of suggestions: (1) Your question lacks detail, context, background which are useful in providing some help. (2) You're asking for too much in a single question. My suggestion is that you split it in several questions (There is no problem in asking many questions if they're not just spam). So try to focus on singular expressions and provide some help in what you mean to convey. :) If you have doubts/questions, you can either comment here or post a Meta question. :) –  Alenanno Apr 7 '12 at 17:24
    
Can someone change the title? Its so vague to not be useful to anyone searching for this. –  jaffa Apr 28 '12 at 21:44
add comment

2 Answers 2

up vote 3 down vote accepted

The transcript is about computer science inheritance concept. And the English is written very poorly. It is not easy to understand in English, if you apply it to this kind of abstract computer science concepts nobody will understand.

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.

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

I don't think the marked bold one correspond to each other very much.

I think the following will be easier for you to understand.

一個類別(A)如果继承了另一類別(B),被继承的(B)為子類別,继承類別(A)則為父類別。子类继承允许代码的重用,可使子类别具有父类别的各种属性和行为,而不需要再次编写相同的代码;唯子類別之独特行为須在本身行為中個別定義。

I hope that you have the basic computer science or programming knowledge before you do this kind of translation, or it will be very difficult for you to translate the whole passage! For reference you can take chinese wikipedia of 继承_(计算机科学).

Hope that helps!

share|improve this answer
    
As a native English speaker, I wouldn't say that the English is "written very poorly." It's dense but clear. –  Jon Apr 19 '12 at 2:11
add comment

继承实现了代码的重用,即相关的类的相同行为被实现一次,不同的行为被单独实现。

share|improve this answer
1  
Hello after, and welcome to CL&U. Do you mind adding an english translation? If possible, don't limit yourself to a quick answer. Expand on it, it will become more valuable! –  Alenanno Apr 24 '12 at 11:40
    
Wow, impressive translation! –  M. Gao Apr 26 '12 at 14:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.