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