From f18c44909c604a01bb0265d006a84223ee88d603 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 1 Mar 2026 18:33:54 +0200 Subject: feat(Week02): Add solutions --- Week02/Exercise05/warehouse.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Week02/Exercise05/warehouse.cpp (limited to 'Week02/Exercise05/warehouse.cpp') diff --git a/Week02/Exercise05/warehouse.cpp b/Week02/Exercise05/warehouse.cpp new file mode 100644 index 0000000..ea968ab --- /dev/null +++ b/Week02/Exercise05/warehouse.cpp @@ -0,0 +1,9 @@ +#include "warehouse.h" + +bool Warehouse::storePackage(const Package& p) { + if (storedPackages >= packageCapacity) + return false; + + packages[storedPackages++] = p; + return true; +} -- cgit v1.3.1-23-gd82d