private void getDocile_Click(object sender, EventArgs e) { if (animalFactoryMain.CurrentFactory != null) { animal = animalFactoryMain.getDocileAnimal(); listBox1.Items.Add("New docile animal fetched"); } else { MessageBox.Show("Select an animal factory first"); } }
public virtual Animal getDocileAnimal() { return(currentFactory.getDocileAnimal()); }