From d735d72a78d1f61b2619bec72325a34b489711d6 Mon Sep 17 00:00:00 2001 From: muskenum Date: Thu, 21 Apr 2016 23:32:14 +0200 Subject: [PATCH] Added weight to Box, not finished --- cicaprojekt/Box.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cicaprojekt/Box.java b/cicaprojekt/Box.java index fe4a386..01875b6 100644 --- a/cicaprojekt/Box.java +++ b/cicaprojekt/Box.java @@ -5,20 +5,40 @@ public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable private int weight; public Box(int w){ + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.Box(" + w + ")"); weight = w; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.Box()"); + Menu.removeTab(); } public int getWeight(){ + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.getWeight()"); return weight; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.getWeight()"); + Menu.removeTab(); } public void setWeight(int w){ + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.setWeight(" + w + ")"); weight = w; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.setWeight()"); + Menu.removeTab(); } public void destroy() { + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.destroy()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.destroy()"); + Menu.removeTab(); } public void pick() { + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.pick()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.pick()"); + Menu.removeTab(); } }