summary refs log tree commit diff
path: root/clone_customer/CloneCustomer/Customer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'clone_customer/CloneCustomer/Customer.cs')
-rw-r--r--clone_customer/CloneCustomer/Customer.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/clone_customer/CloneCustomer/Customer.cs b/clone_customer/CloneCustomer/Customer.cs
new file mode 100644
index 0000000..7461eec
--- /dev/null
+++ b/clone_customer/CloneCustomer/Customer.cs
@@ -0,0 +1,61 @@
+using System;

+

+namespace CloneCustomer

+{

+    public class Customer : ICloneable

+	{

+		private string firstName;

+		private string lastName;

+		private string email;

+

+		public Customer()

+		{

+		}

+

+		public object Clone()

+		{

+			return new Customer(this.firstName, this.lastName, this.email);

+		}

+

+		public Customer(string firstName, string lastName, string email)

+		{

+			this.FirstName = firstName;

+			this.LastName = lastName;

+			this.Email = email;

+		}

+

+		public string FirstName

+		{

+			get {

+				return firstName;

+			}

+			set {

+				firstName = value;

+			}

+		}

+

+		public string LastName

+		{

+			get {

+				return lastName;

+			}

+			set

+			{

+				lastName = value;

+			}

+		}

+

+		public string Email

+		{

+			get {

+				return email;

+			}

+			set {

+				email = value;

+			}

+		}

+

+		public string GetDisplayText() =>

+			firstName + " " + lastName + ", " + email;

+    }

+}