ΠŸΠΎΠΌΠΎΡ‰ΡŒ Π² написании студСнчСских Ρ€Π°Π±ΠΎΡ‚
АнтистрСссовый сСрвис

ΠžΠ±ΠΎΠ±Ρ‰Π΅Π½Π½ΠΎΠ΅ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅, ΡˆΠ°Π±Π»ΠΎΠ½Ρ‹

Лабораторная Ρ€Π°Π±ΠΎΡ‚Π°ΠŸΠΎΠΌΠΎΡ‰ΡŒ Π² Π½Π°ΠΏΠΈΡΠ°Π½ΠΈΠΈΠ£Π·Π½Π°Ρ‚ΡŒ ΡΡ‚ΠΎΠΈΠΌΠΎΡΡ‚ΡŒΠΌΠΎΠ΅ΠΉ Ρ€Π°Π±ΠΎΡ‚Ρ‹

Return «ADVANCESTUDENT-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NameUniver: «+ NameUniver + «NomerStud: «+ NomerStud + «TemaDeklarazii: «+ TemaDeklarazii; Return «STUDENT-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NameUniver: «+ NameUniver + «NomerStud: «+ NomerStud; Return «PUPIL-» + «Name… Π§ΠΈΡ‚Π°Ρ‚ΡŒ Π΅Ρ‰Ρ‘ >

ΠžΠ±ΠΎΠ±Ρ‰Π΅Π½Π½ΠΎΠ΅ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅, ΡˆΠ°Π±Π»ΠΎΠ½Ρ‹ (Ρ€Π΅Ρ„Π΅Ρ€Π°Ρ‚, курсовая, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»ΡŒΠ½Π°Ρ)

Лабораторная Ρ€Π°Π±ΠΎΡ‚Π° № 10

Π’Π΅ΠΌΠ°: ΠΎΠ±ΠΎΠ±Ρ‰Π΅Π½Π½ΠΎΠ΅ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅, ΡˆΠ°Π±Π»ΠΎΠ½Ρ‹ Π—Π°Π΄Π°Π½ΠΈΠ΅ 1

Π Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°ΠΉΡ‚Π΅ ΡˆΠ°Π±Π»ΠΎΠ½Π½ΡƒΡŽ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΡŽ FindMax, Π²Ρ‹ΠΏΠΎΠ»Π½ΡΡŽΡ‰ΡƒΡŽ поиск максимального элСмСнта Π² ΠΌΠ°ΡΡΠΈΠ²Π΅. Π’ ΡΠ»ΡƒΡ‡Π°Π΅, Ссли Ρ‚Π°ΠΊΠΎΠΉ элСмСнт присутствуСт, Ρ‚ΠΎ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ максимального элСмСнта Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ занСсСно Π² Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ maxValue, ΠΏΠ΅Ρ€Π΅Π΄Π°Π²Π°Π΅ΠΌΡ‹ΠΉ ΠΏΠΎ ΡΡΡ‹Π»ΠΊΠ΅, Π° ΡΠ°ΠΌΠ° функция Π²Π΅Ρ€Π½ΡƒΡ‚ΡŒ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ истина. Π’ ΠΏΡ€ΠΎΡ‚ΠΈΠ²Π½ΠΎΠΌ случаС функция Π΄ΠΎΠ»ΠΆΠ½Π° Π²Π΅Ρ€Π½ΡƒΡ‚ΡŒ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ лоТь.

ВСкст ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹

class Program

{

static bool method (T[] t, ref T a)

{

if (t.Length == 0)

{

return false;

}

else

{

a = t. Max ();

return true;

}

}

static void Main (string[] args)

{

string control = «» ;

while (control ≠ «ex»)

{

Console.WriteLine («1 — Create String Array *»);

Console.WriteLine («2 — Create Char Array *»);

Console.WriteLine («3 — Create Int Array *»);

Console.WriteLine («4 — Create Double Array *»);

Console.WriteLine («5 — Create Byte Array *»);

Console.WriteLine («**************************»);

control = Console. ReadLine ();

Console.Clear ();

switch (control)

{

case «1» :

string s_max_string = «» ;

Console.Write («Enter array lenght: «);

int len_s = int. Parse (Console.ReadLine ());

string[] stroki = new string[len_s];

for (int i = 0; i < len_s; i++)

{

stroki[i] = Console. ReadLine ();

}

bool prov_s = method (stroki, ref s_max_string);

Console.Clear ();

Console.Write («Max element: «+ s_max_string);

Console.ReadKey ();

Console.Clear ();

break;

case «2» :

char s_max_char = ' ';

Console.Write («Enter array lenght: «);

int len_c = int. Parse (Console.ReadLine ());

char[] chars = new char[len_c];

for (int i = 0; i < len_c; i++)

{

chars[i] = char. Parse (Console.ReadLine ());

}

bool prov_c = method (chars, ref s_max_char);

Console.Clear ();

Console.Write («Max element: «+ s_max_char);

Console.ReadKey ();

Console.Clear ();

break;

case «3» :

int s_max_int = 0;

Console.Write («Enter array lenght: «);

int len_i = int. Parse (Console.ReadLine ());

int[] ints = new int[len_i];

for (int i = 0; i < len_i; i++)

{

ints[i] = int. Parse (Console.ReadLine ());

}

bool prov_i = method (ints, ref s_max_int);

Console.Clear ();

Console.Write («Max element: «+ s_max_int);

Console.ReadKey ();

Console.Clear ();

break;

case «4» :

double s_max_double = 0.0;

Console.Write («Enter array lenght: «);

int len_d = int. Parse (Console.ReadLine ());

double[] dbs = new double[len_d];

for (int i = 0; i < len_d; i++)

{

dbs[i] = double. Parse (Console.ReadLine ());

}

bool prov_d = method (dbs, ref s_max_double);

Console.Clear ();

Console.Write («Max element: «+ s_max_double);

Console.ReadKey ();

Console.Clear ();

break;

case «5» :

byte s_max_byte = 0;

Console.Write («Enter array lenght: «);

int len_b = int. Parse (Console.ReadLine ());

byte[] bytes = new byte[len_b];

for (int i = 0; i < len_b; i++)

{

bytes[i] = byte. Parse (Console.ReadLine ());

}

bool prov_b = method (bytes, ref s_max_byte);

Console.Clear ();

Console.Write («Max element: «+ s_max_byte);

Console.ReadKey ();

Console.Clear ();

break;

}

}

}

}

Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ выполнСния ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ ΡˆΠ°Π±Π»ΠΎΠ½Π½Ρ‹ΠΉ функция класс интСрфСйс Π—Π°Π΄Π°Π½ΠΈΠ΅ 2

Π Π°Π·Ρ€Π°Π±ΠΎΡ‚Π°ΠΉΡ‚Π΅ ΡˆΠ°Π±Π»ΠΎΠ½Π½Ρ‹ΠΉ класс CMyArray, ΠΏΡ€Π΅Π΄ΡΡ‚Π°Π²Π»ΡΡŽΡ‰ΠΈΠΉ собой массив элСмСнтов Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ³ΠΎ Ρ‚ΠΈΠΏΠ° T.

Массив Π΄ΠΎΠ»ΠΆΠ΅Π½ ΠΏΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΡ‚ΡŒ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ возмоТности:

Β· Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ добавлСния элСмСнта

Β· Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ получСния количСства элСмСнтов

Β· Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ индСксированного доступа ΠΊ ΡΠ»Π΅ΠΌΠ΅Π½Ρ‚Π°ΠΌ

Β· Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ измСнСния Π΄Π»ΠΈΠ½Ρ‹ массива

Β· Π’ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ ΠΎΠΏΡƒΡΡ‚ΠΎΡˆΠ΅Π½ΠΈΡ массива

Β· ΠšΠΎΠ½ΡΡ‚Ρ€ΡƒΠΊΡ‚ΠΎΡ€ копирования ВСкст ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹

class MyGenericClass

{

T[] aa;

int index = 0;

public MyGenericClass (int q)

{

aa = new T[q];

}

public MyGenericClass (MyGenericClass q)

{

aa = q. aa;

}

public void ArrayAdd (T value)

{

aa[index++] = value;

}

public int GetLength ()

{

return aa. Length;

}

public void ArrayResize (int newSize)

{

if (newSize < aa. Length)

{

Console.WriteLine («Error!!!»);

}

else

{

Array.Resize (ref aa, newSize);

}

}

public void ArrayClear ()

{

for (int i = 0; i < aa. Length; i++)

{

aa[i] = default (T);

}

}

public void Show ()

{

foreach (T item in aa)

{

Console.WriteLine («» + item + ««);

}

}

public T GetElement (int qwe)

{

return aa[qwe];

}

}

class Program

{

static void Main (string[] args)

{

string prov = «» ;

int index = 0;

MyGenericClass a1 = null;

MyGenericClass a2 = null;

MyGenericClass a3 = null;

MyGenericClass a4 = null;

string control = «» ;

while (control ≠ «ex»)

{

Console.WriteLine («1 — Create Array *»);

Console.WriteLine («2 — Get Lenght Array *»);

Console.WriteLine («3 — Get Element *»);

Console.WriteLine («4 — Resize Array *»);

Console.WriteLine («5 — Clear Array *»);

Console.WriteLine («6 — Copy Array *»);

Console.WriteLine («*************************»);

control = Console. ReadLine ();

Console.Clear ();

switch (control)

{

case «1» :

Console.WriteLine («What array create? string, int, double, char?»);

string s_c = Console. ReadLine ();

prov = s_c;

if (s_c == «string»)

{

Console.Write («Enter array lenght: «);

index = int. Parse (Console.ReadLine ());

a1 = new MyGenericClass (index);

for (int i = 0; i < index; i++)

{

a1.ArrayAdd (Console.ReadLine ());

}

}

if (s_c == «int»)

{

Console.Write («Enter array lenght: «);

index = int. Parse (Console.ReadLine ());

a2 = new MyGenericClass (index);

for (int i = 0; i < index; i++)

{

a2.ArrayAdd (int.Parse (Console.ReadLine ()));

}

}

if (s_c == «double»)

{

Console.Write («Enter array lenght: «);

index = int. Parse (Console.ReadLine ());

a3 = new MyGenericClass (index);

for (int i = 0; i < index; i++)

{

a3.ArrayAdd (double.Parse (Console.ReadLine ()));

}

}

if (s_c == «char»)

{

Console.Write («Enter array lenght: «);

index = int. Parse (Console.ReadLine ());

a4 = new MyGenericClass (index);

for (int i = 0; i < index; i++)

{

a2.ArrayAdd (char.Parse (Console.ReadLine ()));

}

}

Console.ReadKey ();

Console.Clear ();

break;

case «2» :

if (prov == «string»)

{

Console.WriteLine (a1.GetLength ());

}

if (prov == «int»)

{

Console.WriteLine (a2.GetLength ());

}

if (prov == «double»)

{

Console.WriteLine (a3.GetLength ());

}

if (prov == «char»)

{

Console.WriteLine (a4.GetLength ());

}

Console.ReadKey ();

Console.Clear ();

break;

case «3» :

if (prov == «string»)

{

Console.Write («Enter index: «);

int ind_dost = int. Parse (Console.ReadLine ());

Console.WriteLine (a1.GetElement (ind_dost — 1));

}

if (prov == «int»)

{

Console.Write («Enter index: «);

int ind_dost = int. Parse (Console.ReadLine ());

Console.WriteLine (a2.GetElement (ind_dost — 1));

}

if (prov == «double»)

{

Console.Write («Enter index: «);

int ind_dost = int. Parse (Console.ReadLine ());

Console.WriteLine (a3.GetElement (ind_dost — 1));

}

if (prov == «char»)

{

Console.Write («Enter index: «);

int ind_dost = int. Parse (Console.ReadLine ());

Console.WriteLine (a4.GetElement (ind_dost — 1));

}

Console.ReadKey ();

Console.Clear ();

break;

case «4» :

if (prov == «string»)

{

Console.Write («Enter new size: «);

int new_size = int. Parse (Console.ReadLine ());

a1.ArrayResize (new_size);

}

if (prov == «int»)

{

Console.Write («Enter new size: «);

int new_size = int. Parse (Console.ReadLine ());

a2.ArrayResize (new_size);

}

if (prov == «double»)

{

Console.Write («Enter new size: «);

int new_size = int. Parse (Console.ReadLine ());

a3.ArrayResize (new_size);

}

if (prov == «char»)

{

Console.Write («Enter new size: «);

int new_size = int. Parse (Console.ReadLine ());

a4.ArrayResize (new_size);

}

Console.ReadKey ();

Console.Clear ();

break;

case «5» :

if (prov == «string»)

{

a1.ArrayClear ();

}

if (prov == «int»)

{

a2.ArrayClear ();

}

if (prov == «double»)

{

a3.ArrayClear ();

}

if (prov == «char»)

{

a4.ArrayClear ();

}

Console.ReadKey ();

Console.Clear ();

break;

case «6» :

if (prov == «string»)

{

MyGenericClass copy_a1 = new MyGenericClass (a1);

copy_a1.Show ();

}

if (prov == «int»)

{

MyGenericClass copy_a2 = new MyGenericClass (a2);

copy_a2.Show ();

}

if (prov == «double»)

{

MyGenericClass copy_a3 = new MyGenericClass (a3);

copy_a3.Show ();

}

if (prov == «char»)

{

MyGenericClass copy_a4 = new MyGenericClass (a4);

copy_a4.Show ();

}

Console.ReadKey ();

Console.Clear ();

break;

}

}

}

}

Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ выполнСния ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ Π—Π°Π΄Π°Π½ΠΈΠ΅ 3

Π˜ΠΌΠ΅Π΅Ρ‚ΡΡ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰Π°Ρ иСрархия классов ΠΈ ΠΈΠ½Ρ‚СрфСйсов, ΠΌΠΎΠ΄Π΅Π»ΠΈΡ€ΡƒΡŽΡ‰ΠΈΡ… ΠΈΠ΅Ρ€Π°Ρ€Ρ…ΠΈΡŽ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ΠΎΠ² Π² ΠΎΠ±Ρ‰Π΅ΡΡ‚Π²Π΅ (Ρ‡Π΅Π»ΠΎΠ²Π΅ΠΊ, ΡƒΡ‡ΠΈΡ‚Π΅Π»ΡŒ, ΡƒΡ‡Π΅Π½ΠΈΠΊ, студСнт, Ρ€Π°Π±ΠΎΡ‡ΠΈΠΉ, аспирант):

Бвойства, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΌΠΈ ΠΎΠ±Π»Π°Π΄Π°ΡŽΡ‚ сущности Π΄Π°Π½Π½ΠΎΠΉ ΠΈΠ΅Ρ€Π°Ρ€Ρ…ΠΈΠΈ:

Π‘ΡƒΡ‰Π½ΠΎΡΡ‚ΡŒ

Бвойства

Π§Π΅Π»ΠΎΠ²Π΅ΠΊ

Имя Ѐамилия ΠžΡ‚Ρ‡Π΅ΡΡ‚Π²ΠΎ АдрСс

Π£Ρ‡Π΅Π½ΠΈΠΊ

НазваниС ΡˆΠΊΠΎΠ»Ρ‹ Класс

ΠŸΡ€Π΅ΠΏΠΎΠ΄Π°Π²Π°Ρ‚Π΅Π»ΡŒ

НазваниС ΠΏΡ€Π΅Π΄ΠΌΠ΅Ρ‚Π°

Π‘Ρ‚ΡƒΠ΄Π΅Π½Ρ‚

НазваниС Π’Π£Π—-Π° НомСр студСнчСского Π±ΠΈΠ»Π΅Ρ‚Π°

Аспирант

Π’Π΅ΠΌΠ° диссСртации

Π Π°Π±ΠΎΡ‡ΠΈΠΉ

Π‘ΠΏΠ΅Ρ†ΠΈΠ°Π»ΡŒΠ½ΠΎΡΡ‚ΡŒ

ВСкст ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹

interface IPerson

{

string Name { get; set; }

string Surname { get; set; }

string Otchestvo { get; set; }

string Adress { get; set; }

}

interface IPupil

{

string NameScholl { get; set; }

string NameKlass { get; set; }

}

interface ITeacher

{

string NamePredmet { get; set; }

}

interface IStudent

{

string NameUniver { get; set; }

string NomerStud { get; set; }

}

interface IWorker

{

string Special { get; set; }

}

interface IAdvancedStudent

{

string TemaDeklarazii { get; set; }

}

class CPupil: IPupil, IPerson

{

public string Name { get; set; }

public string Surname { get; set; }

public string Otchestvo { get; set; }

public string Adress { get; set; }

public string NameScholl { get; set; }

public string NameKlass { get; set; }

public override string ToString ()

{

return «PUPIL-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NameScholl: «+ NameScholl + «NameKlass: «+ NameKlass;

}

}

class CTeacher: ITeacher, IPerson

{

public string Name { get; set; }

public string Surname { get; set; }

public string Otchestvo { get; set; }

public string Adress { get; set; }

public string NamePredmet { get; set; }

public override string ToString ()

{

return «TEACHER-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NamePredmet: «+ NamePredmet;

}

}

class CStudent: IStudent, IPerson

{

public string Name { get; set; }

public string Surname { get; set; }

public string Otchestvo { get; set; }

public string Adress { get; set; }

public string NameUniver { get; set; }

public string NomerStud { get; set; }

public override string ToString ()

{

return «STUDENT-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NameUniver: «+ NameUniver + «NomerStud: «+ NomerStud;

}

}

class CWorker: IWorker, IPerson

{

public string Name { get; set; }

public string Surname { get; set; }

public string Otchestvo { get; set; }

public string Adress { get; set; }

public string Special { get; set; }

public override string ToString ()

{

return «WORKER-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «Special: «+ Special;

}

}

class CAdvanceStudent: IAdvancedStudent, IStudent, IPerson

{

public string Name { get; set; }

public string Surname { get; set; }

public string Otchestvo { get; set; }

public string Adress { get; set; }

public string NameUniver { get; set; }

public string NomerStud { get; set; }

public string TemaDeklarazii { get; set; }

public override string ToString ()

{

return «ADVANCESTUDENT-» + «Name: «+ Name + «Surname: «+ Surname + «Otchestvo: «+ Otchestvo + «Adress: «+ Adress + «NameUniver: «+ NameUniver + «NomerStud: «+ NomerStud + «TemaDeklarazii: «+ TemaDeklarazii;

}

}

class List

{

public static List spisok_chel = new List ();

}

class Program

{

static void Main (string[] args)

{

string control = «» ;

while (control ≠ «ex»)

{

Console.WriteLine («1 — Create Pupil *»);

Console.WriteLine («2 — Create Teacher *»);

Console.WriteLine («3 — Create AdvancedStudent *»);

Console.WriteLine («4 — Create Student *»);

Console.WriteLine («5 — Create Worker *»);

Console.WriteLine («6 — Show List *»);

Console.WriteLine («*****************************»);

control = Console. ReadLine ();

Console.Clear ();

switch (control)

{

case «1» :

CPupil cp = new CPupil ();

Console.Write («Enter Name: «);

cp.Name = Console. ReadLine ();

Console.Write («Enter Surname: «);

cp.Surname = Console. ReadLine ();

Console.Write («Enter Otchestvo: «);

cp.Otchestvo = Console. ReadLine ();

Console.Write («Enter Adress: «);

cp.Adress = Console. ReadLine ();

Console.Write («Enter NameKlass: «);

cp.NameKlass = Console. ReadLine ();

Console.Write («Enter NameScholl: «);

cp.NameScholl = Console. ReadLine ();

List.spisok_chel.Add (cp);

Console.ReadKey ();

Console.Clear ();

break;

case «2» :

CTeacher ct = new CTeacher ();

Console.Write («Enter Name: «);

ct.Name = Console. ReadLine ();

Console.Write («Enter Surname: «);

ct.Surname = Console. ReadLine ();

Console.Write («Enter Otchestvo: «);

ct.Otchestvo = Console. ReadLine ();

Console.Write («Enter Adress: «);

ct.Adress = Console. ReadLine ();

Console.Write («Enter NamePredmet: «);

ct.NamePredmet = Console. ReadLine ();

List.spisok_chel.Add (ct);

Console.ReadKey ();

Console.Clear ();

break;

case «3» :

CAdvanceStudent cas = new CAdvanceStudent ();

Console.Write («Enter Name: «);

cas.Name = Console. ReadLine ();

Console.Write («Enter Surname: «);

cas.Surname = Console. ReadLine ();

Console.Write («Enter Otchestvo: «);

cas.Otchestvo = Console. ReadLine ();

Console.Write («Enter Adress: «);

cas.Adress = Console. ReadLine ();

Console.Write («Enter NameUniver: «);

cas.NameUniver = Console. ReadLine ();

Console.Write («Enter NomerStud: «);

cas.NomerStud = Console. ReadLine ();

Console.Write («Enter TemaDeklarazii: «);

cas.TemaDeklarazii = Console. ReadLine ();

List.spisok_chel.Add (cas);

Console.ReadKey ();

Console.Clear ();

break;

case «4» :

CStudent cs = new CStudent ();

Console.Write («Enter Name: «);

cs.Name = Console. ReadLine ();

Console.Write («Enter Surname: «);

cs.Surname = Console. ReadLine ();

Console.Write («Enter Otchestvo: «);

cs.Otchestvo = Console. ReadLine ();

Console.Write («Enter Adress: «);

cs.Adress = Console. ReadLine ();

Console.Write («Enter NameUniver: «);

cs.NameUniver = Console. ReadLine ();

Console.Write («Enter NomerStud: «);

cs.NomerStud = Console. ReadLine ();

List.spisok_chel.Add (cs);

Console.ReadKey ();

Console.Clear ();

break;

case «5» :

CWorker cw = new CWorker ();

Console.Write («Enter Name: «);

cw.Name = Console. ReadLine ();

Console.Write («Enter Surname: «);

cw.Surname = Console. ReadLine ();

Console.Write («Enter Otchestvo: «);

cw.Otchestvo = Console. ReadLine ();

Console.Write («Enter Adress: «);

cw.Adress = Console. ReadLine ();

Console.Write («Enter Special: «);

cw.Special = Console. ReadLine ();

List.spisok_chel.Add (cw);

Console.ReadKey ();

Console.Clear ();

break;

case «6» :

foreach (IPerson item in List. spisok_chel)

{

Console.WriteLine (item.ToString ());

Console.WriteLine («*********************************************************»);

}

Console.ReadKey ();

Console.Clear ();

break;

}

}

}

}

Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚ выполнСния ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹

ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ вСсь тСкст
Π—Π°ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ Ρ„ΠΎΡ€ΠΌΡƒ Ρ‚Π΅ΠΊΡƒΡ‰Π΅ΠΉ Ρ€Π°Π±ΠΎΡ‚ΠΎΠΉ