-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathPerson.cs
More file actions
33 lines (29 loc) · 814 Bytes
/
Person.cs
File metadata and controls
33 lines (29 loc) · 814 Bytes
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
using System;
namespace Exercise
{
public class Customer : LibObject, IRegistrable
{
public string Address { get; set; }
public DateTime RegisteredAt { get; set; }
public Customer(string name, string addr)
{
NameOrTitle = name;
Address = addr;
RegisteredAt = DateTime.Now;
ObjType = ObjectType.Person;
}
public void SetId(int id)
{
ObjectId = id;
}
public RegisteredObject GetRegistrationInfo()
{
return new RegisteredObject
{
Id = ObjectId,
AvailableAmount = AvailableAmount,
Info = String.Format("{0} of {1} ({2})", NameOrTitle, Address, RegisteredAt)
};
}
}
}