Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions Lesson_6/CatalogTree.cs

This file was deleted.

36 changes: 36 additions & 0 deletions Lesson_6/PersonClass.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersonList
{
class PersonClass
{
public string Name;
public string Surname;
public string Patronymic;

public int Age;

public long PhoneNumber;

public int Salary;

public string Post;

public string Email;

public PersonClass(string surname, string name, string patron,
int age, long phone, int salary, string post, string email) { Surname = surname; Name = name;
Patronymic = patron; Age = age; PhoneNumber = phone; Salary = salary; Post = post; Email = email;
}
public void GetInfo()
{
Console.WriteLine($"ФИО сотрудника:\n {Surname} {Name} {Patronymic}\n" +
$"Возраст:\n {Age}\n Телефонный номер:\n {PhoneNumber}\n ЗП:\n {Salary}\n" +
$" Должность:\n {Post}\n Адрес электронной почты:\n {Email}");
}
}
}
26 changes: 26 additions & 0 deletions Lesson_6/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;

namespace PersonList
{
class Program
{
static void Main(string[] args)
{
PersonClass[] people = new PersonClass[5];
people[0] = new PersonClass("Караульных", "Илья", "Владимирович", 25, 89206149880, 40000, "Прогер", "karaulnihiv@gmail.com");
people[1] = new PersonClass("Караульных", "Илья", "Владимирович", 45, 89206149880, 40000, "Прогер", "karaulnihiv@gmail.com");
people[2] = new PersonClass("Караульных", "Илья", "Владимирович", 15, 89206149880, 40000, "Прогер", "karaulnihiv@gmail.com");
people[3] = new PersonClass("Караульных", "Илья", "Владимирович", 55, 89206149880, 40000, "Прогер", "karaulnihiv@gmail.com");
people[4] = new PersonClass("Караульных", "Илья", "Владимирович", 5, 89206149880, 40000, "Прогер", "karaulnihiv@gmail.com");

for (int i = 0; i < people.Length; i++)
{
if (people[i].Age>=40)
{
people[i].GetInfo();
Console.WriteLine();
}
}
}
}
}