Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Unit4.CollectionsLib;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class School
- {
- private Node<Student>[] arr = new Node<Student>[6];
- public School()
- {
- }
- }
- }
- ////
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Student
- {
- private string name;
- private Birth birthday;
- public Student(string n,Birth b)
- {
- this.name = n;
- this.birthday =b;
- }
- public string Getname()
- {
- return this.name;
- }
- public Birth Getbirthday()
- {
- return this.birthday;
- }
- public void Setname(string n)
- {
- this.name = n;
- }
- public void Setbirthday(Birth b )
- {
- this.birthday = b;
- }
- }
- }
- ///
- using System;
- using Unit4.CollectionsLib;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Birth
- {
- private int Day;
- private int Month;
- private int Year;
- public Birth(int d, int m, int y)
- {
- this.Day=d;
- this.Month = m;
- this.Year = y;
- }
- public int GetDay()
- {
- return this.Day;
- }
- public int GetMonth()
- {
- return this.Month;
- }
- public int GetYear()
- {
- return this.Year;
- }
- public void SetDay(int d)
- {
- this.Day = d;
- }
- public void SetMonth(int m)
- {
- this.Month = m;
- }
- public void SetYear(int y)
- {
- this.Year = y;
- }
- public override string ToString()
- {
- string str = "The day is:" + this.Day + " The month is:" + this.Month + "The year is:" + this.Year;
- return str;
- }
- }
- }
- ///
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement