/// <summary>
 /// Defines the feeing instructions for the herbivorous seaturtle
 /// </summary>
 private void HerbivoreSchedule()
 {
     // create a new item of type foodschedule
     foodscheme = new FoodSchedule();
     // adds some items to the list of strings
     foodscheme.AddFoodScheduleItem("Morning: Bowl of mixed seaweed");
     foodscheme.AddFoodScheduleItem("Lunch: Seaweed salad, with pieces of mango and dragon fruit");
     foodscheme.AddFoodScheduleItem("Evening: Seaweed crackers and fruit salad");
 }
 /// <summary>
 /// Define a schedule for feeding omnivorous pigeons
 /// </summary>
 private void Omnivorous()
 {
     // create new foodschedule item.
     foodscheme = new FoodSchedule();
     // add some items to list
     foodscheme.AddFoodScheduleItem("Morning: One small bowl of insects and seeds");
     foodscheme.AddFoodScheduleItem("Lunch: Breadcrums, worms and fireflies");
     foodscheme.AddFoodScheduleItem("Evening: Sesame seed crackers and a bowl of small insects");
 }
 /// <summary>
 /// Generate schedule for omnivorous parrots
 /// </summary>
 private void Omnivore()
 {
     // create new object of type foodschedule
     foodscheme = new FoodSchedule();
     foodscheme.AddFoodScheduleItem("Morning: One bowl of fruit and peanuts");
     foodscheme.AddFoodScheduleItem("Lunch: Fruitsallad, peanutbisquits and spiderlegs");
     foodscheme.AddFoodScheduleItem("Evening Bowl of fish and tropical fruit");
     foodscheme.AddFoodScheduleItem("Observe that this bird should never be fed chocholate");
 }
 /// <summary>
 /// define the feeding schedule for omnivorous chameleons
 /// </summary>
 private void OmnivorSchedule()
 {
     // create a new item of type foodschedule
     foodscheme = new FoodSchedule();
     // add some items in the list
     foodscheme.AddFoodScheduleItem("Morning: 1 plate of fruit and insects");
     foodscheme.AddFoodScheduleItem("Lunch fruit and fisch pieces");
     foodscheme.AddFoodScheduleItem("Afternoon: 2 pieces of mango");
     foodscheme.AddFoodScheduleItem("Evening, 1/2 bird egg and a bowl of insects");
 }
 /// <summary>
 /// Produces a schedule for carnivorous chameleons creating a list of strings to send as parameter to the foodschedule class when
 /// instanciated.
 /// </summary>
 private void CarnivorSchedule()
 {
     //create an item of the type foodscheme
     foodscheme = new FoodSchedule();
     // adds some feeding directions for the carnivorous variant of chameleon
     foodscheme.AddFoodScheduleItem("Morning: 1 plate with small fish");
     foodscheme.AddFoodScheduleItem("Lunch: Mix of fish and small spiders");
     foodscheme.AddFoodScheduleItem("Afernoon: Insect snacks");
     foodscheme.AddFoodScheduleItem("Evening: One bowl of spidermeat");
 }
 /// <summary>
 /// Carnivorous schedule for seaturtle used to detail what a meat eating sea turtle animal would eat
 /// </summary>
 private void CarnivoreSchedule()
 {
     // create a new object of type Foodschedule
     foodscheme = new FoodSchedule();
     // add instructions
     foodscheme.AddFoodScheduleItem("Morning: two big salmons and a bowl of northern herring");
     foodscheme.AddFoodScheduleItem("Lunch: Landturtle meat and a bowl of cubed raw salmon");
     foodscheme.AddFoodScheduleItem("Afernoon: Small tropical fish");
     foodscheme.AddFoodScheduleItem("Evening: One bowl of raw sealmeat");
 }
 /// <summary>
 /// defines instructions for feeding an omnivorous seaturtle
 /// </summary>
 private void OmnivoreSchedule()
 {
     // create a new item of type foodschedule
     foodscheme = new FoodSchedule();
     // add instructions
     foodscheme.AddFoodScheduleItem("Morning: A bowl of seaweed, five seaweedcrakers and two small bird eggs");
     foodscheme.AddFoodScheduleItem("Lunch: Seaweed sallad with salmon and herring pieces");
     foodscheme.AddFoodScheduleItem("Afternoon: Seaweed crackers and sesame seed bread");
     foodscheme.AddFoodScheduleItem("Evening: Seaweed, half a salmon and five herrings");
 }
 /// <summary>
 /// Define a schedule for carnivorous pigeons
 /// </summary>
 private void Carnivorous()
 {
     // create an obect of type foodschedule
     foodscheme = new FoodSchedule();
     // add a number of items to the list
     foodscheme.AddFoodScheduleItem("Dawn: The Pigeon will hunt for small insects such as fleas and maggots");
     foodscheme.AddFoodScheduleItem("Morning: One small bowl of spiderlegs and bumblebees");
     foodscheme.AddFoodScheduleItem("Lunch: One big spider");
     foodscheme.AddFoodScheduleItem("Evening: The Pigeon will hunt smaller insects such as fireflies by itself");
 }
 /// <summary>
 /// define a schedule for feeding herbivorous pigeons
 /// </summary>
 private void Herbivorous()
 {
     // create new item of type foodschedule
     foodscheme = new FoodSchedule();
     // add some items
     foodscheme.AddFoodScheduleItem("Morning: Sesame seeds and breadcrumbs");
     foodscheme.AddFoodScheduleItem("Lunch: Fruit and berries");
     foodscheme.AddFoodScheduleItem("Afternoon: Nuts and various seeds");
     foodscheme.AddFoodScheduleItem("Evening: bowl of corn and small nuts");
 }
 /// <summary>
 /// Generate schedule for carnivorous parrots
 /// </summary>
 private void Carnivore()
 {
     // create new object of type foodschedule
     foodscheme = new FoodSchedule();
     // add some items to list
     foodscheme.AddFoodScheduleItem("Morning: Bowl of jumbo insect legs");
     foodscheme.AddFoodScheduleItem("Lunch: spiderlegs and giant mosquitos");
     foodscheme.AddFoodScheduleItem("Afternoon: Maggots and fishpieces hidden in enclosure for the bird to search");
     foodscheme.AddFoodScheduleItem("Evening, bowl of tropical insects");
 }
 /// <summary>
 /// Genereate schedule for herbivorous parrots
 /// </summary>
 private void Herbivore()
 {
     // create new foodschedule
     foodscheme = new FoodSchedule();
     // add some items
     foodscheme.AddFoodScheduleItem("Morning: Half a mango and a bowl of peanuts");
     foodscheme.AddFoodScheduleItem("Lunch: Tropical fruits and nuts");
     foodscheme.AddFoodScheduleItem("Afternoon: Hide nuts and fruit in enclosure for bird to search");
     foodscheme.AddFoodScheduleItem("Occasionally: Some extra nutcrackers");
     foodscheme.AddFoodScheduleItem("Evening: Dranonfruit and apples");
 }
 /// <summary>
 /// define the feeding schedule for herbivorous chameleons
 /// </summary>
 private void HerbivorSchedule()
 {
     // intitiate new list of strings
     // create new instance of foodschedule
     foodscheme = new FoodSchedule();
     // add some items to the list of strings
     foodscheme.AddFoodScheduleItem("Morning: Plant leaves and fruit pieces");
     foodscheme.AddFoodScheduleItem("Lunch: A bowl of friut pieces and plant leaves");
     foodscheme.AddFoodScheduleItem("Afternoon: 4 pieces of mango and some water");
     foodscheme.AddFoodScheduleItem("Evening: a bowl of mango and apple pieces");
     foodscheme.AddFoodScheduleItem("Often: refill water herbivorous chameleons consume much water every day");
 }
Example #13
0
        /// <summary>
        /// The below method drives the lokal generate foodschedule methods from within the specific animal objects based on their specie.
        /// It take an animal as a parameter(obviosly the recently added one) and search for the speciename within the animal object
        /// Switch case can be expanded on later when more species are added
        /// </summary>
        public void GenerateFoodSchedule(T anim)
        {
            string       specie   = (anim as Animal).GetSpecies(); // get the name of the specie
            FoodSchedule schedule = new FoodSchedule();            // create new object of foodschedule type

            switch (specie)                                        // runs a switch statement based on the string for speciename
            {
            case "Chameleon":
                (anim as Chameleon).GetFoodschedule();
                break;

            case "Sea Turtle":
                (anim as SeaTurtle).GetFoodschedule();
                break;

            case "Pigeon":
                (anim as Pigeon).GetFoodschedule();
                break;

            case "Parrot":
                (anim as Parrot).GetFoodschedule();
                break;
            }
        }