Question on instructions for Java

  • Context: Java 
  • Thread starter Thread starter camel-man
  • Start date Start date
  • Tags Tags
    Java
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
camel-man
Messages
76
Reaction score
0
Can someone tell me what they think this is referring to?

On the create event for a form add 3 animal instances to a list.

A form just meaning a GUI? and what does it mean on the create event? Clicking something to add the animals perhaps?
 
Physics news on Phys.org
The information you're providing is pretty sketchy but ...
Apparently there is a procedure for handling a "Create" event - perhaps a "Create Form" event. In that procedures a form object is created. Apparently there is an animal class and a list that can hold animal object or pointers to animal objects. It isn't specified whether the Form includes this list or if the lists exists elsewhere. If the list doesn't already exist, them perhaps you're suppose to add it to either the forum class or to the class of the object that is handling the event.
 
camel-man, there's a lot here that is not clear, such as exactly what a "form" is (i.e., exactly which Java class).

"on the create event for a form" - you need to write a handler for the Create event. When that event is fired, your event handler begins executing

"add 3 animal instances" - you are either given a definition for the animal class, or you have to write it yourself. Either way, in the body of your event handler for the create event, add three instances of the animal class to whatever list you need to be working with.

Hope that helps, but your problem description is pretty vague.