-
Notifications
You must be signed in to change notification settings - Fork 0
/
Product.cs
58 lines (49 loc) · 1.27 KB
/
Product.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
namespace APBD_repo_2;
public class Product
{
private int _id;
private string _name;
private double _temperature; //of product not of the container
private bool _isDangerous;
private string _typeOfProduct;
public string TypeOfProduct
{
get => _typeOfProduct;
set => _typeOfProduct = value ?? throw new ArgumentNullException(nameof(value));
}
public int ID
{
get => _id;
set => _id = value;
}
public string Name
{
get => _name;
set => _name = value ?? throw new ArgumentNullException(nameof(value));
}
public double Temperature
{
get => _temperature;
set => _temperature = value;
}
public bool IsDangerous
{
get => _isDangerous;
set => _isDangerous = value;
}
public Product(int id, string name, double temperature, bool isDangerous)
{
ID = id;
Name = name;
Temperature = temperature;
IsDangerous = isDangerous;
}
public Product(int id, string name, double temperature, bool isDangerous, string typeOfProduct)
{
ID = id;
Name = name;
Temperature = temperature;
IsDangerous = isDangerous;
TypeOfProduct = typeOfProduct;
}
}