using System.Collections.Generic;
Dictionary<string, string> phoneNumbers;
Dictionary<string, string> addresses;
this.phoneNumbers = new Dictionary<string, string>();
this.addresses = new Dictionary<string, string>();
public void AddPhoneNumber(string description, string phoneNumber)
this.phoneNumbers.Add(description, phoneNumber);
public void AddAddress(string description, string address)
this.addresses.Add(description, address);
public void SetName(string name)
public void SetSSN(string SSN)
public void PrintAllAddresses()
foreach(KeyValuePair<string, string> entry in this.addresses)
Console.WriteLine(entry.Key + ": " + entry.Value);
public void PrintAllPhoneNumbers()
foreach(KeyValuePair<string, string> entry in this.phoneNumbers)
Console.WriteLine(entry.Key + ": " + entry.Value);
Console.WriteLine("We are going to create our first employee type of variable, since its a variable of type class its type is an object");
Employee employee1 = new Employee();
employee1.SetName("Micheal");
employee1.SetSSN("23132132152");
employee1.AddAddress("Address 1", "Seattle, US");
employee1.AddAddress("Address 2", "London, UK");
employee1.AddPhoneNumber("Phone 1:", "+156475646");
employee1.AddPhoneNumber("Phone 2:", "+5 56465415");
Console.WriteLine("Below is all the addresses stored in our employee 1 object");
employee1.PrintAllAddresses();
Console.WriteLine("Creating new Employee object in our program!");
Employee employee2 = new Employee();
employee2.SetName("Jessica");
employee2.SetSSN("73132132152");
employee2.AddAddress("Address 1", "California, US");
employee2.AddAddress("Address 2", "Paris, France");
employee2.AddPhoneNumber("Phone 1:", "+186475646");
employee2.AddPhoneNumber("Phone 2:", "+5 86465415");
Console.WriteLine("Below is all the addresses stored in our employee 2 object");
employee2.PrintAllAddresses();
Console.WriteLine(employee1.GetName());
Console.WriteLine(employee2.GetName());
Dictionary<string, Employee> allEmployees = new Dictionary<string, Employee>();
allEmployees.Add("First", employee1);
allEmployees.Add("Second", employee2);
Console.WriteLine("Below is all the phone numbers stored in our employee 1 object");
employee1.PrintAllPhoneNumbers();
Console.WriteLine("Below is all the phone numbers stored in our employee 2 object");
employee2.PrintAllPhoneNumbers();