| [ next ] [ prev ] [ contents ] | Connascence and Java |
Connascence of value occurs when the values of two components are related.
class Retangle {
private int left;
private int right;
private int top;
private int bottom;
// Constraint: left < right
// Constraint: top > bottom
}
|
class Queue {
private int myHead;
private int myTail;
// myHead == myTail => Queue Empty
// myHead+1 == myTail => Queue Full (modulo arithmetic)
}
|
| [ next ] [ prev ] [ contents ] | Copyright 2001 by Jim Weirich. All rights reserved. |