document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2. * Hendra Ramadani (05111740000055)
  3. * 19/Nov/18
  4. */
  5. import java.awt.Color;
  6. public class Counter
  7. {
  8. private String name;
  9. private int count;
  10.  
  11. public Counter(String name)
  12. {
  13. this.name = name;
  14. count = 0;
  15. }
  16.  
  17. public String getName()
  18. {
  19. return name;
  20. }
  21.  
  22. public int getCount()
  23. {
  24. return count;
  25. }
  26.  
  27. public void increment()
  28. {
  29. count++;
  30. }
  31.  
  32. public void reset()
  33. {
  34. count = 0;
  35. }
  36. }
');