using System.Collections.Generic;
using System.Diagnostics;
public static void Main()
const int tierA = 300, tierB = 600;
const double comA=1.3,comB=1.6,comC=1.9;
List<Employee> empName = getlist();
double[] profits = new double[empName.Count];
Stopwatch stopWatch = new Stopwatch();
for(int i = 0;i<empName.Count;i++){
if(empName[i].Sales<=tierA)
profits[i]=empName[i].Sales * comA;
else if (empName[i].Sales>tierA && empName[i].Sales<=tierB)
profits[i]=empName[i].Sales * comB;
profits[i]=empName[i].Sales * comC;
Console.WriteLine(profits[i]);
TimeSpan ts = stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
Console.WriteLine("RunTime " + elapsedTime);
protected static List<Employee> getlist()
var employee = new List<Employee>();
var random = new Random();
string[] consonants = { "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "l", "n", "p", "q", "r", "s", "sh", "zh", "t", "v", "w", "x" };
string[] vowels = { "a", "e", "i", "o", "u", "ae", "y" };
string[] product = { "life", "non-life"};
Name += consonants[random.Next(consonants.Length)].ToUpper();
Name += vowels[random.Next(vowels.Length)];
for( int i = 0; i < arraySize; ++i ) {
employee.Add( new Employee {
Name = consonants[random.Next(consonants.Length)]+vowels[random.Next(vowels.Length)] + consonants[random.Next(consonants.Length)]+vowels[random.Next(vowels.Length)],
Sales=random.Next( 1000 ),
Product=product[random.Next(product.Length)]
public string Name { get; set; }
public string Product { get; set; }
public double Sales { get; set; }
public double Commission { get; set; }