-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChemical.cs
44 lines (36 loc) · 1.08 KB
/
Chemical.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
using System;
using System.Runtime.Serialization;
namespace OOP_Project
{
[Serializable][DataContract (Name = "Quimico")]
public class Chemical : Container //sub-classe de contentores
{
[DataMember (Name = "Tipo Quimico")]
private string _type;
public Chemical(){}
public Chemical(string type, string destination, int weight)
{
ShipNumber = -1;
Number = ContainerNumber();
Destination = destination;
Weight = weight;
_type = type;
}
public string GetNewType()
{
return _type;
}
public void SetType(string type)
{
_type = type;
}
public override string ToString()
{
var s = base.ToString();
s += "\n\t\t\tCarga Química";
s += "\n\t\t\tDescrição do químico: " + _type;
s += "\n\t\t---------------------------------------------------------------------------------------------";
return s;
}
}
}