CoolDictionary.com Webster Dictionary with PRONUNCIATION and Sound!

I would like to access properties to do with the language, as well as properties of the subject,Any suggestions ?

 
 
   

Question: I have classes to tailor reports. These reports really fit a matrix, i.e. there are two logical ways to structure them. For example: one way is by subject (Twheels, with descendants Tcars, Ttrains, etc. and each of these splitting further into subclasses). The other way is by language.

Ideally, I'd like to create an object for a report on cars in English, and one for trains in French. Clearly, there are many similarities between the reports of a same language (like all the headers, truncation rules, etc.) and also, there are many similarities between cars, race cars and oldtimers.

I would like to access properties to do with the language, as well as properties of the subject. (In reality it is not about cars and languages, but the problem is the same.)

Any suggestions ?


Answer: Interfaces. You can have a list of interfaces that declare the relevant methods and properties for your languages, and a list of interfaces for your subjects, and every report can mark itself as implementing one interface from either list.

Where this breaks down is in code re-use, because the obvious implementation simply reiterates similar code in every class. You can get around that by delegating interfaces to objects that implement a language or subject interface for a report, but it's rather a hairy topic

Submit Your Own Answer!

Google





 
 
| Home | English Course Questions | English Grammar Questions | Teaching Esl Questions | Esl Exercise Questions | Esl General Questions | Esl How To Questions | Esl Learning Questions | Esl Lessons Questions | Esl Other Languages | Esl Pronounciation Questions | Learning Sign Language Questions | Esl Worksheets Questions | Esl Adult Questions | Esl Beginner Questions | Conversational English Questions | Site Map |