public override List <University> get(List <University> universities)
        {
            University[] array = universities.ToArray();
            for (int i = 1; i < array.Length; i++)
            {
                int        j      = 0;
                University buffer = array[i];
                for (j = i - 1; j >= 0; j--)
                {
                    if (array[j].getFreePlaces() < buffer.getFreePlaces())
                    {
                        break;
                    }
                    array[j + 1] = array[j];
                }
                array[j + 1] = buffer;
            }
            List <University> universities1 = new List <University>(array);

            return(universities1);
        }
Ejemplo n.º 2
0
        public University newUniversity(string title, int places)
        {
            University u = UniversityCreator.newUniversity(title, places);

            return(u);
        }