Part 1 & 2

This commit is contained in:
KäseToatz
2024-09-25 22:24:42 +02:00
commit a33cf50a4c
14 changed files with 382 additions and 0 deletions

View File

@ -0,0 +1,15 @@
namespace Buckets.Logic
{
public class Rainbarrel : Container
{
private readonly int[] ALLOWED_CAPACITIES = [80, 100, 120];
public Rainbarrel(int capacity, int content) : base(capacity, content)
{
if (!ALLOWED_CAPACITIES.Contains(capacity))
{
throw new ArgumentException($"Capacity must be one of the following values: {string.Join(", ", ALLOWED_CAPACITIES)}.");
}
}
}
}