From c7d6bdd37261fc753052923b83e3a092a2b2d3ae Mon Sep 17 00:00:00 2001 From: Samuel Oberhofer Date: Mon, 23 May 2022 21:52:08 +0200 Subject: [PATCH] demo main --- Uebung 1/main.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Uebung 1/main.cpp b/Uebung 1/main.cpp index 2c19522..a0a4468 100644 --- a/Uebung 1/main.cpp +++ b/Uebung 1/main.cpp @@ -1,3 +1,25 @@ #include "Sortiment.h" +#include "Ware.h" +#include -int main() { return 0; } \ No newline at end of file +int main() { + + Sortiment sortiment; + + sortiment.addWare(new Ware("ware1", 2, 13.5, 10, 20)); + sortiment.addWare(new Ware("ware1", 7, 14.6, 15, 20)); + sortiment.addWare(new Ware("ware1", 5, 2.1, 13, 10)); + sortiment.addWare(new Ware("ware1", 2, 6.5, 10, 20)); + sortiment.addWare(new Ware("ware1", 7, 22.6, 15, 20)); + sortiment.addWare(new Ware("ware1", 5, 15.1, 13, 10)); + sortiment.addWare(new Ware("ware1", 2, 13.5, 10, 20)); + sortiment.addWare(new Ware("ware1", 7, 13.6, 15, 20)); + sortiment.addWare(new Ware("ware1", 5, 13.1, 13, 10)); + sortiment.addWare(new Ware("ware1", 5, 13.1, 13, 10)); + + sortiment.sort(2); + + for (int i = 0; i < 10; i++) { + std::cout << sortiment.waren[i]->getGewicht() << std::endl; + } +} \ No newline at end of file