From e8e45cb59e1e17335df58892864d0cc8d43d3461 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Thu, 26 Nov 2020 21:29:04 +0300 Subject: [PATCH] implement color output --- src/MakkahCity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MakkahCity.java b/src/MakkahCity.java index 11831f7..eb61ba2 100644 --- a/src/MakkahCity.java +++ b/src/MakkahCity.java @@ -472,12 +472,12 @@ public class MakkahCity { "*********| District | Average Arrival | Avg. time\n"; StringBuilder report = new StringBuilder(); report.append(String.format(headerFormat, currenttimeManager.getCurrentTime(), status)); - String streetFormat = "%-18s | %%%-8s | %5d | %5d | %14d | %-9s"; + String streetFormat = "%-27s | %%%-8s | %5d | %5d | %14d | %-9s"; String districtForamt = " | %-9s | %%%-14d | %s"; for (int i = 0; i < stdStreet.length; i++) { int cap = stdStreet[i].getPercentRemainingCapacity(); report.append(String.format(streetFormat, - stdStreet[i].getName().name(), + getColoredStreetName(stdStreet[i], cap), cap, stdStreet[i].getVehicles().size(), stdStreet[i].getNumberOfBuses(),