diff --git a/Counter.java b/Counter.java index c8ef943..8d33696 100644 --- a/Counter.java +++ b/Counter.java @@ -1,20 +1,23 @@ -package samples; - -import sl4j.logger.log; +package sample; public class Counter { - private int value; + private static int value = 0; - public Counter() { - this.value = 0; - log.log("Counter created"); - } + /** + * Creates a counter instance + * @return Counter instance + */ + private Counter() {} - public int increment(){ - return ++this.value; + /** + * Increments the counter value + * @return counter value + */ + public static int increment(){ + return ++value; } - public int reset(){ - return this.value = 0; + public static void reset(){ + value = 0; } } diff --git a/Example_v0.java b/Example_v0.java index 8d5507a..c110938 100644 --- a/Example_v0.java +++ b/Example_v0.java @@ -1,19 +1,16 @@ -package controller; +package sample; import java.util.Random; +import java.awt.font.*; public class A { - private static int Z; + private static final int Z; public A() { A.Z = 5; } - public int fcn(){ - return A.Z * 5; - } - - public int test(){ + public int production(){ return A.Z * 5; } }