Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object and Control and Class
Message
 
 
To
24/03/2006 09:35:34
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01107358
Message ID:
01107406
Views:
19
>Hi,What is Defference of Class with Object and Control?
>please Explain simple text and example.
>thank you.

I'll try to explain in very simple manner, though there are tons of references in Internet.

Class is an abstract model of the real objects. Say, we're looking at the car. The car can have various properties and methods. Let's say, for our purpose we're interested in just two properties: the release date (date, when the car was put on sale - what's the name for this date?) and maximum possible speed.

So, we create a class CAR with two properties: dRelease_Date and nMaxSpeed.

We can have multiple objects of this class, which would represent different cars.

oFORD = createobject('CAR')

oHonda = createobject('CAR')

Then you can set properties of the objects. As you can see, you can instantiate any number of objects of the same class and then manipulate each object individually.

That's the simplest eplanation here. You can have much better explanations if you google on "inheritance, encapsulation, polymorphism".
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform