-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
49 lines (42 loc) · 2.1 KB
/
Copy pathProgram.cs
File metadata and controls
49 lines (42 loc) · 2.1 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
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace CustomerDemo
{
class Program
{
static void Main(string[] args)
{
// Create a new Customer instance
Customer customer = new Customer("Christos", "Frantzidis", "cfrantzidis@lincoln.ac.uk", 41);
// Using the default constructor
Customer customer1 = new Customer();
// Using the constructor that takes two parameters
Customer customer2 = new Customer("John", "Stevenson");
// Access and display customer details
Console.WriteLine($"Default Customer1 Details: {customer1.FirstName} {customer1.LastName}, Email: {customer1.Email}, Age: {customer1.Age} ");
Console.WriteLine($"Customer2 Details: {customer2.FirstName} {customer2.LastName}, Email: {customer2.Email}, Age: {customer2.Age} ");
Console.WriteLine($"Customer Details: {customer.FirstName} {customer.LastName}, Email: { customer.Email}, Age: { customer.Age} ");
// Modify customer details
customer.FirstName = "Jane";
customer.LastName = "Smith";
customer.Email = "jane.smith@example.com";
customer.Age = 28;
// Display updated details
Console.WriteLine($"Updated Customer Details: {customer.FirstName} {customer.LastName}, Email: {customer.Email}, Age: {customer.Age} ");
Console.WriteLine("------------------------");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("This is an additional change");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}