You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Port
types
PortTypes = int | bool | seq of char | real
operations
protected dgdg : ()==>()
dgdg()== is sub class responsibility;
public getValue:() ==> PortTypes
getValue()==return value;
public setValue:() ==>PortTypes
setValue()==return value;
end Port
class IntPort
instance variables
value : int ;
operations
public getValue:() ==>int
getValue()==return value;
public setValue:() ==>int
setValue()==return value;
end IntPort
class RealPort
instance variables
value : real ;
operations
public getValue:() ==>real
getValue()==return value;
public setValue:() ==>real
setValue()==return value;
end RealPort
and then the system class can be changed to:
new Sensor(hwi.level);
The text was updated successfully, but these errors were encountered:
and then the system class can be changed to:
The text was updated successfully, but these errors were encountered: