package anabalica.github.io.meowletters.metrics;

/**
 * Level class keeps current user level. User starts from level 1 and advances
 * as much as possible. There is no top limit.
 *
 * @author Ana Balica
 */
public class Level {
}

@@ -223,10 +223,651 @@
 Level %7B%0A
+    private int level;%0A%0A    public Level() %7B%0A        level = 1;%0A    %7D%0A%0A    public Level(int level) %7B%0A        setLevel(level);%0A    %7D%0A%0A    public int getLevel() %7B%0A        return level;%0A    %7D%0A%0A    public void setLevel(int level) throws IllegalArgumentException %7B%0A        if (level %3C 1) %7B%0A            throw new IllegalArgumentException(%22Level must be a positive number%22);%0A        %7D%0A        this.level = level;%0A    %7D%0A%0A    public int updateLevel(int points) %7B%0A        if (points %3E 0) %7B%0A            level = (Integer) (points / 50) + 1;%0A        %7D%0A        return level;%0A    %7D%0A%0A    public Level reset() %7B%0A        level = 1;%0A        return this;%0A    %7D%0A
 %7D%0A

implement Level class