swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

objective-c question


From: Tamas Papp
Subject: objective-c question
Date: Mon, 12 Apr 1999 15:52:45 -0600 (MDT)

I'm writing a model that needs different demand curves (functions which
assign a quantity demanded to any given price.) I thought of writing a
"placeholder" class, DemandCurve, and subclasses like LinearDemandCurve,
PolynomialDemandCurve, etc. I define DemandCurve as 

@interface DemandCurve
{
}

- (double)getQuantity: (double)price;
@end

and then writing the subclasses. The classes which use a demand curve
would get a pointer to a DemandCurve subclass, but use it as a DemandCurve
because they only need the getQuantity function. How is this done in
Objective-C? I only have experience with C++.

Regards,

Tamas

P.S.: Does anybody know and URL for a good intoductory & reference page
for Objective C online?


                  ==================================
   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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]