Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4.  
  5.  
  6. public class Discipline : IName, IDetails
  7. {
  8. string name;
  9. uint numberOfLectures;
  10. IList<Student> students;
  11. string details;
  12. public string Name
  13. {
  14. get
  15. {
  16. return this.name;
  17. }
  18. set
  19. {
  20. if (string.IsNullOrEmpty(value)) throw new ArgumentNullException("A discipline has to have a name");
  21. this.name = value;
  22. }
  23. }
  24. public uint NumberOfLectures
  25. {
  26. get
  27. {
  28. return this.numberOfLectures;
  29. }
  30. set
  31. {
  32. this.numberOfLectures = value;
  33. }
  34. }
  35. public IList<Student> Students
  36. {
  37. get
  38. {
  39. return this.students;
  40. }
  41. set
  42. {
  43. this.students = value;
  44. }
  45. }
  46. public string Details
  47. {
  48. get
  49. {
  50. return this.details;
  51. }
  52. set
  53. {
  54. this.details = value;
  55. }
  56. }
  57. public Discipline(string name, uint numberOfLectures, IList<Student> students, string details = null)
  58. {
  59. this.Name = name;
  60. this.NumberOfLectures = numberOfLectures;
  61. this.Students = students;
  62. this.Details = details;
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement