Declaration and Instantiation (Python Style)

A declaration-instantiation statement is used to create a Jeroo object. The declaration-instantiation statements must appear in the main section before any other statements.

A declaration-instantiation statement has the form
   identifier = Jeroo( arguments )
There are six forms for the arguments as shown in the following table.

Example

Attributes

Kim = Jeroo()


Accept default attributes
Name: Kim
Location: (0,0)
Direction: EAST
Flowers: 0
Kim = Jeroo(8)


Specify the flowers
Name: Kim
Location: (0,0)
Direction: EAST
Flowers: 8
Kim = Jeroo(3,4)


Specify the location
Name: Kim
Location: (3,4)
Direction: EAST
Flowers: 0
Kim = Jeroo(3,4,WEST)


Specify location and direction
Name: Kim
Location: (3,4)
Direction: WEST
Flowers: 0
Kim = Jeroo(3,4,8)


Specify location and flowers
Name: Kim
Location: (3,4)
Direction: EAST
Flowers: 8
Kim = Jeroo(3,4,SOUTH,8)


Specify all attributes
Name: Kim
Location: (3,4)
Direction: SOUTH
Flowers: 8