develop
This commit is contained in:
@@ -27,6 +27,7 @@ public class Main
|
|||||||
|
|
||||||
if (line.trim().isEmpty()) continue;
|
if (line.trim().isEmpty()) continue;
|
||||||
|
|
||||||
|
|
||||||
String[] parts = line.split(",");
|
String[] parts = line.split(",");
|
||||||
|
|
||||||
if (parts.length >= 3)
|
if (parts.length >= 3)
|
||||||
@@ -55,6 +56,7 @@ public class Main
|
|||||||
System.out.println("=== Products loaded");
|
System.out.println("=== Products loaded");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ReportGenerator reportGenerator = new ReportGenerator("2025_order_details.csv", Collections.unmodifiableList(productCatalog));
|
ReportGenerator reportGenerator = new ReportGenerator("2025_order_details.csv", Collections.unmodifiableList(productCatalog));
|
||||||
reportGenerator.processFile();
|
reportGenerator.processFile();
|
||||||
System.out.println("=== Order file processed");
|
System.out.println("=== Order file processed");
|
||||||
|
|||||||
@@ -26,3 +26,4 @@ public class Product
|
|||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ import java.util.List;
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void saveReport()
|
public void saveReport()
|
||||||
{
|
{
|
||||||
try (PrintWriter writer = new PrintWriter(new FileWriter("report.txt")))
|
try (PrintWriter writer = new PrintWriter(new FileWriter("report.txt")))
|
||||||
|
|||||||
Reference in New Issue
Block a user