Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Discipline : IName, IDetails
  5. {
  6.     private string name = null;
  7.  
  8.     public string Name
  9.     {
  10.         get
  11.         {
  12.             return this.name;
  13.         }
  14.         set
  15.         {
  16.             if (string.IsNullOrEmpty(value)) throw new ArgumentNullException("A discipline has to have a name");
  17.             this.name = value;
  18.         }
  19.     }
  20.  
  21.     public uint NumberOfLectures { get; set; }
  22.     public IList<Student> Students { get; set; }
  23.     public string Details { get; set; }
  24.  
  25.     public Discipline(string name, uint numberOfLectures, IList<Student> students, string details = null)
  26.     {
  27.         this.Name = name;
  28.         this.NumberOfLectures = numberOfLectures;
  29.         this.Students = students;
  30.         this.Details = details;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement