Connascence of Value (CoV)
Connascence of Value (CoV) occurs when two or more components' values are related or have an intrinsic range of validity in their input not expressed by their primitive types.
Let's consider the initial example:
public class Time { Â Â Â Â int _hour; Â Â Â Â int _minute; Â Â Â Â int _second; Â Â Â Â public Time(int hour, int minute, int second){ Â Â Â Â Â Â Â Â _hour = hour; Â Â Â Â Â Â Â Â _minute = minute; Â Â Â Â Â Â Â Â _second = second; Â Â Â Â } Â Â Â Â public string Display(){ Â Â Â Â Â Â Â Â return _hour + ":" + _minute + ":" + _second + ":"; Â Â Â Â } }
What happens if we instantiate it like this:
var myTime = new Time (27, 76, 82);
That's obviously not...