|
A lot of terms have been introduced in this part of the article, one of the problems people have with OO programming is simply getting used to
the jargon. So lets have a little recap:
- We code our object (known as class in C++ and Java) using functions in Jamagic.
- The function named after the object (ie Dog), which is run for every new object we create is called the "constructor"
- To create an instance of our object the "new" operator is used and this can be called "making an instance of ..."
- When we create the object we have to assign a pointer so we can reference our new object, this can be any legal variable name.
- The object can hold variables called "member variables"
- The object can contain other functions that do some job releated to our object, these are called "instance methods"
- Instance methods that just allow the user to set or get a member variable can also be called "assessor methods"
- To access member variables directly or call instance methods we use the dot "." operator.
In the second part to this article (coming soon) we will see:
- Jamagic has many internal objects, one of which "Window" we have already used.
- User created objects can even contain other user created objects or Jamagic internal objects.
- 3dd Objects - What they are, How to use them, How to create them.
- Limitations of Jamagics approach to OO.
|