コード例 #1
0
ファイル: CarRentalForm.cs プロジェクト: TomHartogs/School
 private void AddTestDataToAdministration()
 {
     string[] licencePlates = {"SD-001", "SD-002", "SD-003", "SD-004", "LM-001", "LM-002"};
     administration = new RentalAdministration();
     for (int i = 0; i < 4; i++)
     {
         Car sedan = new Sedan("BMW", "535d", 2012 + i, licencePlates[i], false);
         administration.Add(sedan);
     }
     for (int i = 4; i < 6; i++)
     {
         Car limousine = new Limousine("Rolls Roys", "Phantom Extended Wheelbase", 2015, licencePlates[i], true);
         administration.Add(limousine);
     }
 }
コード例 #2
0
 private void AddTestDataToAdministration()
 {
     string[] licencePlates = { "SD-001", "SD-002", "SD-003", "SD-004", "LM-001", "LM-002" };
     administration = new RentalAdministration();
     for (int i = 0; i < 4; i++)
     {
         Car sedan = new Sedan("BMW", "535d", 2012 + i, licencePlates[i], false);
         administration.Add(sedan);
     }
     for (int i = 4; i < 6; i++)
     {
         Car limousine = new Limousine("Rolls Roys", "Phantom Extended Wheelbase", 2015, licencePlates[i], true);
         administration.Add(limousine);
     }
 }