merge develop into main #1

Merged
Sadra3st merged 3 commits from develop into main 2026-06-10 05:16:41 +00:00
Showing only changes of commit 19be24ad97 - Show all commits
+6 -12
View File
@@ -10,10 +10,10 @@ public class ReportGenerator {
private final String ordersFilePath;
private final List<Product> productList;
private double totalFinalCost;
private int totalQuantity;
private double totalDiscountValue;
private int totalInvalidLines;
private double totalFinalCost = 0;
private int totalQuantity = 0;
private double totalDiscountValue = 0;
private int totalInvalidLines = 0;
public ReportGenerator(String ordersFilePath, List<Product> productList) {
this.ordersFilePath = ordersFilePath;
@@ -22,12 +22,10 @@ public class ReportGenerator {
public void processFile()
{
Scanner scanner = null;
try {
File file = new File(ordersFilePath);
scanner = new Scanner(file);
try (Scanner scanner = new Scanner(file)){
while (scanner.hasNextLine()) {
@@ -76,10 +74,6 @@ public class ReportGenerator {
System.out.println("File not found: " + ordersFilePath);
}
if (scanner != null) {
scanner.close();
}
}
public void saveReport()