潜行者晴空结局全死了:谁能帮我翻译计算机数据库文章!万分感谢!!

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 04:58:15
In overriding for restriction, the protocol of the new operation in the subclass is restricted. For example , an operation called place-student(job) in Student may be restricted in the International Student subclass by tightening the argument job (see Figure 14-12).While students in general may be placed in all types of jobs during the summer, international students may be limit to only on-campus jobs because of visa restrictions . The new operation overrides the inherited operation by tightening the job argument, restricting its values to only a small subset of all possible jobs. This example also illustrates the use of multiple discriminators. While the basis for one set of generalizations is a student’s “level” (graduate or undergraduate), that for the other set is his or her “residency” status (U.S. or international).
In overriding for optimization, the new operation is implemented with improved code by exploiting the restrictions imposed by a subclass. Consider, for example, a subclass of Student called Dean’s List Student, which represents all those students who are on the Dean’s List. To qualify for the Dean’s List, a student must have a grade point average greater than or equal to 3.50.Suppose Student has an operation called mailScholApps, which mails applications for merit-and means-tested scholarships to students who have a gpa greater than or equal to 3.00, and whose family’s total gross income is less than $20,000.The method for operation in Student will have to check the conditions, whereas the method foe the same operation in the Dean’s List Student subclass can improve upon the speed of execution by removing the first condition from its code. Consider another operation called findMinGpa, which finds the minimum gpa among the students. Suppose the Dean’s List Student class is not. The method for findMinGpa in Student must perform a sequential search through all students. In contrast, the same operation in Dean’s List Student can be implemented with a method that simply retrieves the gpa of the first student in the list, thereby obviating the need for a time-consuming search.
Representing Multiple Inheritance
So far you have been exposed to single inheritance, where a class inherits from only one superclass. But sometimes, as we saw in the example with research and teaching assistants, an object may be an instance of more than one class. This is known as multiple classification (Fowler, 1997; UML Notation Guide, 1997). For instance, Sean Bailey, who has both types of assistantships, has tow classification: one as an instance of Research Assistant and the other as an instance of Teaching Assistant. Multiple classification, however, is discouraged by experts. It is not supported by the ordinary UML semantics and many object-oriented languages.

我晕,有这时间自己用软件一个单词一个单词的翻译都译出来了。