forked from itmentors-dotnet25/Advanced-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguagePatternsTasks.cs
More file actions
46 lines (37 loc) · 1.56 KB
/
Copy pathLanguagePatternsTasks.cs
File metadata and controls
46 lines (37 loc) · 1.56 KB
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
37
38
39
40
41
42
43
44
45
46
namespace Advanced.Tasks.LanguagePatterns;
/// <summary>
/// Создавайте классы и рекорды в отдельном файле в папке LanguagePatterns
/// </summary>
public class LanguagePatternsTasks
{
/// <summary>
/// Задание 4.1: Создайте record Person с свойствами Name и Age.
/// </summary>
/// <summary>
/// Задание 4.2: Создайте класс Product с init-only свойствами.
/// </summary>
/// <summary>
/// Задание 4.3: Используйте pattern matching для определения типа объекта.
/// </summary>
public string GetObjectType(object obj)
{
throw new NotImplementedException();
}
/// <summary>
/// Задание 4.4: Используйте switch expression для вычисления стоимости доставки.
/// </summary>
public decimal CalculateShippingCost(string shippingType, decimal weight)
{
throw new NotImplementedException();
}
/// <summary>
/// Задание 4.5: Создайте record и напишите код (в отдельном классе DemonstrateDeconstruction) использования деконструкции.
/// </summary>
/// <summary>
/// Задание 4.6: Используйте property patterns класса Product для проверки условий.
/// </summary>
public string GetProductStatus(Product product)
{
throw new NotImplementedException();
}
}