in a theoretical view how would the function "absSensor" in the class "sensorFinal" be able to call the function "proximitySensorAdjusted" in the class "proximitySensor" IF the class "sensorFinal" does not have access to the integer "value"?
Is there a standard way to call functions in which access to data is limited or is there a workaround? Thanks in advance!
public class proximitySensor
{
double adjustment = 5;
public double proximitySensorAdjusted(int value)
{
double finalValue = value + adjustment;
return finalValue;
}
}
public class sensorFinal
{
public double absSensor()
{
proximitySensor sensorValue = new proximitySensor();
sensorValue.proximitySensorAdjusted( ??? )
}
}
valuein sight is an argument of the methodproximitySensorAdjusted(int value). It's local to that method; nothing else has access to it and thus nothing else can need access to it either.sensorValue.proximitySensorAdjusted(???)?