From abf784868daa920a9ca8b3b9d291a7cf521aa9c7 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Wed, 1 Mar 2023 16:00:40 -0500 Subject: [PATCH] remove unused vars --- Assignment 2/src/ca/cosc3p91/a2/Main.java | 2 +- Assignment 2/src/ca/cosc3p91/a2/util/Print.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Assignment 2/src/ca/cosc3p91/a2/Main.java b/Assignment 2/src/ca/cosc3p91/a2/Main.java index e808fc1..b74c2e5 100644 --- a/Assignment 2/src/ca/cosc3p91/a2/Main.java +++ b/Assignment 2/src/ca/cosc3p91/a2/Main.java @@ -8,7 +8,7 @@ public class Main { public static void main(String[] args) { GameEngine engine = new GameEngine(); - Print test = new Print("Hello There", 2, 500); + Print test = new Print("Hello There", 2); test.addColumn(new Print.Column("I am value 1")); test.addColumn(new Print.Column("Super Value")); diff --git a/Assignment 2/src/ca/cosc3p91/a2/util/Print.java b/Assignment 2/src/ca/cosc3p91/a2/util/Print.java index e8dd54f..2d8ef59 100644 --- a/Assignment 2/src/ca/cosc3p91/a2/util/Print.java +++ b/Assignment 2/src/ca/cosc3p91/a2/util/Print.java @@ -36,18 +36,17 @@ public class Print { private final ArrayList rows = new ArrayList<>(); private final ArrayList columns = new ArrayList<>(); - private String tableName; - private int columnPadding; + private final String tableName; + private final int columnPadding; private int maxColumnWidth; - public Print(String tableName, int columnPadding, int maxColumnWidth){ + public Print(String tableName, int columnPadding){ this.tableName = tableName; this.columnPadding = columnPadding; - this.maxColumnWidth = maxColumnWidth; } public Print(){ - this("", 2, 500); + this("", 2); } private String createPadding(int amount) {