szimulacio/SzimulacioOOP/Ceg.cs

49 lines
1.1 KiB
C#
Raw Permalink Normal View History

2024-09-24 11:00:05 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SzimulacioOOP
{
internal class Ceg
{
public List<Auto> Autok { get; set; }
public Fonok Igazgato { get; set; }
public List<Sofor> Vezetok { get; set; }
2024-10-01 11:00:31 +00:00
private int Autodb;
2024-09-24 11:00:05 +00:00
public Benzinkut Benzinkut { get; set; }
2024-10-01 11:00:31 +00:00
public Ceg() {
Igazgato = new Fonok("Nagy Főnök");
Benzinkut = new Benzinkut();
Autodb = 5;
GenSoforok();
GenAutok();
}
private void GenAutok()
{
Autok = new List<Auto>();
for (int i = 0; i < Autodb; i++)
{
Autok.Add(new Auto($"ceges{i}"));
}
}
private void GenSoforok()
{
Vezetok = new List<Sofor>();
for (int i = 0; i < Autodb; i++)
{
Vezetok.Add(new Sofor($"sofor-{i}"));
}
}
internal void SzimulacioIndul()
{
throw new NotImplementedException();
}
2024-09-24 11:00:05 +00:00
}
}