Algorithmen_Datenstrukturen/Uebung 1/main.cpp

25 lines
793 B
C++

#include "Sortiment.h"
#include "Ware.h"
#include <iostream>
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;
}
}