PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/Kronos/Kronos/CLASSES/BaseCourse.cs

https://github.com/lle/soen341kronos
C# | 35 lines | 24 code | 6 blank | 5 comment | 0 complexity | 6951a0efb6930d61f0a19e0a1665014a MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace Kronos.CLASSES
  6. {
  7. //base class
  8. //use polymorphism and inheritence for sub classes of base class
  9. // to use polymorphism you use the keywork override
  10. //make a call to the base constructor to intialize specific values, and then fill the rest with the sub-constructor
  11. //there should be 4 sub classes, 1 only lecture, 1 with tutorial and lecture, and 1 with tutorials and labs and lectures, and 1 with lectures and labs no tutorials
  12. public class BaseCourse
  13. {
  14. protected float class_time;
  15. protected LinkedList<globalvariables.day> class_days;
  16. protected string class_section;
  17. protected virtual float get_set_class_time { get { return class_time; } set { value = class_time; } }
  18. protected virtual LinkedList<globalvariables.day> get_set_linkedlist_courses { get { return class_days; } set { value = class_days; } }
  19. protected virtual string get_set_class_sections { get { return class_section; } set { value = class_section; } }
  20. public BaseCourse(globalvariables.day[] class_days, float class_time, string class_section)
  21. {
  22. this.class_days = new LinkedList<globalvariables.day>();
  23. foreach (globalvariables.day count_days in class_days)
  24. this.class_days.AddLast(count_days);
  25. this.class_section = class_section;
  26. this.class_time = class_time;
  27. }
  28. }
  29. }