Advertisement
AvengersAssemble

Untitled

Apr 19th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.12 KB | None | 0 0
  1. using System;
  2. using Unit4.CollectionsLib;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class School
  9.     {
  10.         private Node<Student>[] arr = new Node<Student>[6];
  11.         public School()
  12.         {
  13.  
  14.         }
  15.     }
  16.            
  17.  
  18. }
  19. ////
  20. using System;
  21. using System.Collections.Generic;
  22. using System.Linq;
  23. using System.Text;
  24.  
  25. namespace ConsoleApplication1
  26. {
  27.     class Student
  28.     {
  29.         private string name;
  30.         private Birth birthday;
  31.          
  32.         public Student(string n,Birth b)
  33.         {
  34.             this.name = n;
  35.             this.birthday =b;
  36.            
  37.  
  38.         }
  39.  
  40.         public string Getname()
  41.         {
  42.             return this.name;
  43.         }
  44.         public Birth Getbirthday()
  45.         {
  46.             return this.birthday;
  47.         }
  48.         public void Setname(string n)
  49.         {
  50.             this.name = n;
  51.  
  52.         }
  53.         public void Setbirthday(Birth b )
  54.         {
  55.             this.birthday = b;
  56.  
  57.         }
  58.  
  59.     }
  60. }
  61.  
  62. ///
  63. using System;
  64. using Unit4.CollectionsLib;
  65. using System.Linq;
  66. using System.Text;
  67.  
  68. namespace ConsoleApplication1
  69. {
  70.     class Birth
  71.     {
  72.         private int Day;
  73.         private int Month;
  74.         private int Year;
  75.  
  76.         public  Birth(int d, int m, int y)
  77.         {
  78.            this.Day=d;
  79.             this.Month = m;
  80.             this.Year = y;
  81.         }
  82.         public int GetDay()
  83.         {
  84.             return this.Day;
  85.         }
  86.         public int GetMonth()
  87.         {
  88.             return this.Month;
  89.         }
  90.         public int GetYear()
  91.         {
  92.             return this.Year;
  93.         }
  94.         public void SetDay(int d)
  95.         {
  96.             this.Day = d;
  97.            
  98.         }
  99.         public void SetMonth(int m)
  100.         {
  101.             this.Month = m;
  102.  
  103.         }
  104.         public void SetYear(int y)
  105.         {
  106.             this.Year = y;
  107.  
  108.         }
  109.         public override string ToString()
  110.         {
  111.             string str = "The day is:" + this.Day + " The month is:" + this.Month + "The year is:" + this.Year;
  112.             return str;
  113.         }
  114.  
  115.        
  116.  
  117.  
  118.     }
  119. }
  120.  
  121. ///
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement