-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
36 lines (29 loc) · 1.08 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab2v2
{
public enum Frequency { Weekly, Monthly, Yearly };
class Program
{
static void Main()
{
Person kirill = new Person("Кирилл", "Сергеивич", new DateTime(1995, 12, 1));
Person andrey = new Person();
Person dima = new Person("Дима", "Петров", new DateTime(1997, 4, 10));
Article war = new Article();
Article world = new Article(kirill,"Мир",13.5);
Article newgames = new Article(dima,"Новый шутер", 15.1);
Magazine wizard = new Magazine();
Magazine games = new Magazine("Игры", Frequency.Weekly, new DateTime(2014, 11, 4), 5432 );
wizard.AddArticle(world);
wizard.AddArticle(war);
games.AddArticle(newgames);
Console.WriteLine(wizard.ToString());
Console.WriteLine($"\n{games.ToString()}");
return;
}
}
}