Ejemplo n.º 1
0
 public ClassDef(string cName, int mAttendants)
 {
     ID            = Guid.NewGuid();
     ClassName     = cName;
     MinAttendants = mAttendants;
     Hosts         = new List <Teacher>();
     Students      = new List <Student>();
     AllClasses.Add(this);
 }
Ejemplo n.º 2
0
        /// <summary>Parses array of string into a AllClasses object </summary>
        /// <param name="allCsvRows">All rows of csv file</param>
        /// <returns>object of AllClasses object</returns>
        public static AllClasses ParseHomeWorkTrackerCsvFile(string[] allCsvRows)
        {
            var newClasses = new AllClasses();

            foreach (var currentRow in allCsvRows)
            {
                var currentLine = currentRow.Split(Commas.ToCharArray());

                var newCourse = buildNewCourse(currentLine);
                newClasses.Add(newCourse);
            }

            return(newClasses);
        }