[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: objective-c question
From: |
Marcus G. Daniels |
Subject: |
Re: objective-c question |
Date: |
Mon, 12 Apr 1999 16:21:34 -0600 (MDT) |
TP> The classes which use a demand curve would get a pointer to a
TP> DemandCurve subclass, but use it as a DemandCurve because they only
TP> need the getQuantity function. How is this done in Objective-C? I only
TP> have experience with C++
Here's how you specify the subclasses interfaces, if that's what you mean...
#import <objectbase/SwarmObject.h>
@interface DemandCurve: SwarmObject
@end
@interface LinearDemandCurve: DemandCurve
{
double scaling;
}
- setScaling: (double)scaling;
- (double)getQuantity: (double)price;
@end
@interface PolynomialDemandCurve: DemandCurve
{
double *terms;
}
- setScalingVector: (double *)scalingVector;
- (double)getQuantity: (double)price;
@end
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.