[ next ] [ prev ] [ contents ] Connascence and Java

Contranascence

Contranascence occurs when two components must agree on different names.

Example

  
int i;
...
int j;

 ==>

  
int i;
...
int i;  // oops!

Example

  
interface Pump {
    void draw();
}
interface Icon {
    void draw();
}
class PumpIcon 
    implements Pump, Shape
{
    void draw () {
        // Which version of draw is this???
    }
}


[ next ] [ prev ] [ contents ] Copyright 2001 by Jim Weirich.
All rights reserved.