title: I have a task and I am stuck with it [ classes, arrays, cycles ]
body: <p>My foreign language is not English, but I'll try to do my best.</p>
  
  <p>*</p>
  
  <p>The transfer between email and servers is happening. Interface speed via internet is known from a file. You need to make a list of servers which haven't got any bite of data in at least one hour period. By having the time when sender sent his email, you can count when the email was fully transferred ( sent ) to the servers. If the transfer ( of the letter ) was fully transferred the next hour, then this hour counts too.   letters.csv ( time the letter was sent, sender, receiver, server's name, letter's size)  servers.csv ( server's name, speed ( bites/second ) ) All the results have to be placed in a .csv file. The results should be written in this order : server's name, letters received, overall size of all letters, how long did it take to transfer all the letters, how long server didn't get any letter. All the letters are sent at the same moment they are received. There should be no server witch was not used at least once.</p>
  
  <p>*</p>
  
  <p>letters.csv example </p>
  
  <blockquote>
    <p>13:15:47;Gustas@inbox.lt;Justas@inbox.lt;Serveris_1;50
    05:45:11;Tomas@inbox.lt;Simas@inbox.lt;Serveris_3;42
    12:13:22;Mindaugas@inbox.lt;Justas@inbox.lt;Serveris_3;6
    07:15:42;Gustas@inbox.lt;Mindaugas@inbox.lt;Serveris_2;19
    08:18:32;Jonas@inbox.lt;Tomas@inbox.lt;Serveris_1;112</p>
  </blockquote>
  
  <p>servers.scv example</p>
  
  <blockquote>
    <p>Serveris_1;15 
    Serveris_2;24 
    Serveris_3;3</p>
  </blockquote>
  
  <p><strong>Every example I made myself!</strong></p>
  
  <pre><code>namespace _1
  {
      class Letters
      {
          public string Time { get; set; }
          private string Sender { get; set; }
          private string Receiver { get; set; }
          public string ServerName { get; set; }
          public int FileSize { get; set; }
  
          public Letters() { }
          public Letters(string time, string sender, string receiver, string servername, int filesize)
          {
              Time = time;
              Sender = sender;
              Receiver = receiver;
              ServerName = servername;
              FileSize = filesize;
          }
      }
  
      class Servers
      {
          public string ServerName { get; set; }
          public int Speed { get; set; }
  
          public Servers() { }
          public Servers(string servername, int speed)
          {
              ServerName = servername;
              Speed = speed;
          }
      }
  
      class Program
      {
          public const int Minute = 60;
  
          private const int MAX_LETTERS = 50;
          private const int MAX_SERVERS = 5;
  
  
          private static int AmmountOfLetters = 0;
          private static int AmmountOfServers = 0;
  
          static void Main(string[] args)
          {
              Letters[] letters = ReadLaiskaiData();
              Servers[] servers = ReadServersData();
  
              TransferToServers(letters, servers);
  
  
          }
  
          // Reikia sudaryti sąrašą serverių, į kuriuos nebuvo perduota nei vieno baito, kurios nors valandos bėgyje.
          /* PERDAVIMAS Į SERVERIUS   */
          private static void TransferToServers(Letters[] letters, Servers[] servers)
          {
              int speed = 0;
              int f_size = 0;
              int fileSizeLeft = 0;
  
              for(int i = 0; i &lt; MAX_LETTERS; i++)
              {
                  int valanda =  Int32.Parse(letters[i].Time.Substring(0, 2));
                  fileSizeLeft = letters[i].FileSize;
  
                  for(int k = valanda; k &lt; (valanda + 24); k++)
                  {
                      switch (letters[i].ServerName)
                      {
                          case "Serveris_1":
                          {
                              for (int m = 0; m &lt; 60; m++)
                              {
                                  speed = servers[i].Speed;
                                  f_size = letters[i].FileSize;
                                  fileSizeLeft = letters[i].FileSize - speed;
                                  Console.WriteLine("{0}", f_size);
                                  Console.WriteLine("{0}", fileSizeLeft);
                              }
                              break;
                          }
                          case "Serveris_2":
                          {
                              break;
                          }
                          case "Serveris_3":
                          {
                              break;
                          }
                      }
                  }
                  Console.WriteLine("{0}", valanda);
              }
          }
  
          /* SERVERIŲ SKAITYMAS IŠ FAILO  */
          private static Servers[] ReadServersData()
          {
              Servers[] servers = new Servers[MAX_SERVERS];
              using (StreamReader reader = new StreamReader(@"Serveris.csv"))
              {
                  string line = null;
                  while ((line = reader.ReadLine()) != null)
                  {
                      string[] values = line.Split(';');
  
                      string servername = values[0];
                      int speed = int.Parse(values[1]);
  
                      Servers server = new Servers(servername, speed);
                      servers[AmmountOfServers++] = server;
                      Console.WriteLine("{0} {1}", servername, speed);
                  }
              }
              return servers;
          }
  
          /* LAIŠKŲ SKAITYMAS IŠ FAILO    */
          private static Letters[] ReadLaiskaiData()
          {
              Letters[] letters = new Letters[MAX_LETTERS];
              using (StreamReader reader = new StreamReader(@"laiskai.csv"))
              {   
                  string line = null;
                  while((line = reader.ReadLine()) != null)
                  {
                      string[] values = line.Split(';');
  
                      string time = values[0];
                      string sender = values[1];
                      string receiver = values[2];
                      string servername = values[3];
                      int filesize = int.Parse(values[4]);
  
                      Letters letter = new Letters(time, sender, receiver, servername, filesize);
                      letters[AmmountOfLetters++] = letter;
                      Console.WriteLine("{0} {1} {2} {3} {4}", time, sender, receiver, servername, filesize);
                  }
              }
              return letters; 
          }
      }
  }
  </code></pre>
  
  <p>I don't even know if I am doing it the right way. I do not have the idea how to do the counting part. I hope I have translated the task understandable. Hopefully any of you can help me.</p>