Report a paste

Please put a quick comment for the admin.

If it looks like spam, the admin will mark it as spam so that the spam filter picks it up in the future.

If the paste contains something private or offensive, it'll probably just be deleted.

Classes 1_4

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lab_1_4 {
	class Program {
		class Worker {
			static protected Dictionary<string, int> stavka = new Dictionary<string, int> {
				{"учитель математики",100},
				{"слесарь",200},
				{"электрик",300} };
			private string FIO;
			protected string dolchnost;
			private int year;
			public Worker(string FIO, string dolchnost, int year) {
				this.FIO = FIO;
				this.dolchnost = dolchnost;
				this.year = year;
			}
			virtual public void Show() {
				Console.Write("\nФИО: {0}\nДолжность:{1}\nГод поступления: {2}\n",
				FIO, dolchnost, year);
			}
			public int Year // свойство возвращает и устанавливает год
			{
				get {
					return year;
				}
				set {
					year = value;
				}
			}
			public double Zarplata(int days) {
				return 8 * stavka[dolchnost] * days;
			}
		}
		class Teacher : Worker {
			static protected Dictionary<int, double> koeff = new Dictionary<int, double> {
				{1,1.25},
				{2,1},
				{0,1.5} };
			int nagruzka;
			int kategoria;
			public Teacher(string FIO, int year, int nagruzka, int kategoria) :
			base(FIO, "учитель математики", year) {
				this.nagruzka = nagruzka;
				this.kategoria = kategoria;
			}
			public override void Show() {
				base.Show();
				Console.Write("\tНагрузка:{0}\n\tКатегория:{1}\n", nagruzka, kategoria);
			}
			public double Zarplata() {
				return stavka[dolchnost] * nagruzka * koeff[kategoria];
			}
		}
		static void Main() {
			Worker P = new Worker("Сабитова Анна Ивановна", "менеджер", 2007);
			Worker A = new Worker("Николаев Евгений Дмитриевич", "таксист", 2000);
			Teacher S = new Teacher("Неповинных Лилия Серговна", 2009, 400, 1);
			Teacher B = new Teacher("Вохмянина Маргарита Ивановна", 2016, 360, 2);
			P.Show();
			A.Show();
			S.Show();
			B.Show();
			Console.ReadKey();
		}
	}
}