okay this is what i have to do
Code a class named GalacticCommunity. This class has the attributes:
?communityName: String{the name of this Galaxy}
?alienArray: array of AlienCreatures
?lastIndex: int {the index of the last alien in the array}
?current{the index of the alien being viewed}
Code a constructor that accepts an int parameter defining the size of the array.
Code the following methods:
?add(AlienCreature creature): void
?getCurrent(): AlienCreature {returns the AlienCreature at index current}
?first(): void{if the array is not empty, sets current to the first AlienCreature}
this is whatr i have to do
Code a class named GalacticCommunity. This class has the attributes:
?communityName: String{the name of this Galaxy}
?alienArray: array of AlienCreatures
?lastIndex: int {the index of the last alien in the array}
?current{the index of the alien being viewed}
Code a constructor that accepts an int parameter defining the size of the array.
Code the following methods:
?add(AlienCreature creature): void
?getCurrent(): AlienCreature {returns the AlienCreature at index current}
?first(): void{if the array is not empty, sets current to the first AlienCreature}
i dont know how to do the first() method