Defining Instance Variables
An instance variable is a variable associated with a class. Each instance of the class will have its own private copies of the class's instance variables.
Once the empty class declaration has been written, variables can be added using the heading + variables, followed by the list of instance variables. Variables are
listed in the format variable_name (variable_type).
The variable name must start with a letter, but afterwards it may contain any alphanumeric characters, as well as the characters _ and -.
Multiple variables of the same type can also be declared on the same line:
variable1, variable2, variable3, ..., variableN (variableType).
Variable types are covered in detail in the section Types ([link]).
As an example, we'll add some variables to the simple class we created in the previous section:
Mobile : myMobile {
+ variables:
myInt, myOtherInt (int).
myObject (object).
myFloat (float).
}
