using System.Collections.Generic;
Dictionary<string, string> employeeNames;
Dictionary<string, string> phoneNumbers;
Dictionary<string, string> addresses;
this.employeeNames = new Dictionary<string, string>();
this.phoneNumbers = new Dictionary<string, string>();
this.addresses = new Dictionary<string, string>();
public void AddEmployeeName(string description, string name)
this.employeeNames.Add(description, name);
Console.WriteLine("Employee name: " + employeeNames[description]);
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 SetSSN(string SSN)
public void PrintAllAddresses()
foreach(KeyValuePair<string, string> entry in this.addresses)
Console.WriteLine(entry.Key + ": " + entry.Value);
Console.WriteLine("create allEmployee dictionary that store both employee1 and employee2 objects");
Dictionary<string, string> allEmployees = new Dictionary<string, string>();
Employee employee1 = new Employee();
employee1.AddEmployeeName("Name", "Mashael");
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");
foreach (KeyValuePair<string , string> employee in allEmployees)
Console.WriteLine(employee.Key + ":" + employee.Value);
employee1.PrintAllAddresses();
Employee employee2 = new Employee();
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();