Skip to content

Commit

Permalink
Update report.h to cout full report
Browse files Browse the repository at this point in the history
  • Loading branch information
cwong165 committed Aug 30, 2023
1 parent 62632a1 commit 5485dce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/report.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ void ReportGenerator::generateReport(int option,
}
}

if (!soonExpire.empty()) {
cout << "Items Soon to Expire:\n";
for (const auto & item: soonExpire) {
cout << item.first << ": " << item.second << "\n";
}
} else {
cout << "Nothing is expiring soon.\n";
}

cout << "\nTotal Transactions: " << getTotalTransactions(filteredTransactions) << "\n";
cout << "Average Basket Size: " << getAverageBasketSize(filteredTransactions) << "\n";
cout << "Discounts Applied: " << getDiscountUsage(filteredTransactions) << "\n";
Expand Down

0 comments on commit 5485dce

Please sign in to comment.