From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog2/Prakt3/Aufg1/Table.cpp | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Bachelor/Prog2/Prakt3/Aufg1/Table.cpp (limited to 'Bachelor/Prog2/Prakt3/Aufg1/Table.cpp') diff --git a/Bachelor/Prog2/Prakt3/Aufg1/Table.cpp b/Bachelor/Prog2/Prakt3/Aufg1/Table.cpp new file mode 100644 index 0000000..9b6a2bf --- /dev/null +++ b/Bachelor/Prog2/Prakt3/Aufg1/Table.cpp @@ -0,0 +1,52 @@ +#include "Table.h" +#include "Team.h" +#include +#include + +using std::cout; +using std::endl; +using std::string; +using std::ostream; +using std::left; +using std::setw; + +void Table::setTeam(const Team& toSet) +{ + teams.push_back(toSet); +} + +void Table::print(ostream& output) +{ + int n=0; + output << left << setw(22) << "Team" << setw(9) << "Matches" << setw(12) << "Games won" << setw(12) + << "Games lost" << setw(12) << "Points won" << setw(12) << "Points lost" << endl;; + + while(nteams[n].getpointsWon()) + if(!(teams[j]