develop #1
@@ -88,10 +88,10 @@ public class ReportGenerator {
|
||||
{
|
||||
PrintWriter writer = new PrintWriter("report.txt");
|
||||
|
||||
writer.println("========= SALES REPORT =========");
|
||||
writer.println("===== SALES REPORT =====");
|
||||
writer.println("Total Quantity Sold: " + totalQuantity);
|
||||
writer.println("Total Final Cost: " + totalFinalCost);
|
||||
writer.println("Total Discount Value: " + totalDiscountValue);
|
||||
writer.println("Total Final Cost: " + String.format("%.2f", totalFinalCost));
|
||||
writer.println("Total Discount Value: " + String.format("%.2f", totalDiscountValue));
|
||||
writer.println("Invalid Rows: " + totalInvalidLines);
|
||||
|
||||
writer.close();
|
||||
@@ -100,7 +100,7 @@ public class ReportGenerator {
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
System.err.println("Failed in writing the report!");
|
||||
System.err.println("Failed to write the report!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user