Projektdateien hinzufügen.

This commit is contained in:
2023-03-23 12:24:40 +01:00
parent 5fe92f4f47
commit 33e49f846c
51 changed files with 1444 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeispielKomposition
{
internal class Building
{
private string name;
private Floor[] floors;
public Building(string name, int floors)
{
this.name = name;
this.floors = new Floor[floors];
for (int i = 0; i < this.floors.Length; i++)
{
this.floors[i] = new Floor(i);
}
}
public void PrintInfos()
{
Console.WriteLine($"Gebäude {name}:");
foreach (Floor floor in floors)
{
Console.WriteLine("Etage " + floor.GetFloorid());
}
}
}
}