CSU HAYWARD

DEPARTMENT OF MATHEMATICS AND

COMPUTER SCIENCE

COLLOQUIUM

 

 

Monday, February 18, 2002 noon-1pm ScS125

Speaker: David Yang, St. Joseph's University

Candidate for Faculty Position in Computer Science

 

Inheritance of Interface and Practical Reuse

or

How is Computing a Spreadsheet Formula like Drawing a Diagram?

As computer science programs hop on the object-oriented bandwagon, students all learn about how object-oriented languages like C++ and Java allow you to make use of existing code by inheriting it from another class. This kind of inheritance is called inheritance of implementation. The reality is that many similar problems have enough differences that it is not possible to reuse the code as is.

Inheritance of interface offers a different approach to finding opportunities for reuse. At the simplest level, it supports a style of reuse focused more on the algorithm than the data. One example of this is in providing an elegant way for spreadsheets to support computation of formulas. The formula contained in a cell may refer to other cells, which may in turn also be formula cells.

A more general application of inheritance of interface focuses on the reuse of the design of a solution rather than the reuse of the code for the solution. Since the focus is on the design, the reuse may involve problems in rather different areas. Our approach to supporting spreadsheet formulas can be applied to drawing graphics, among other problems. Such a shared design is an example of what is called a design pattern.

Interface classes were deemed deserving of their own keyword in Java to distinguish it from regular classes. Design patterns have been found useful enough that some of them have found their way into the standard Java libraries.

 

Please join us beforehand for pizza.