• Source
    1. /*
    2. Author: Cristian Orjuela
    3. Description: Ejemplo de clase
    4. */
    5.  
    6. //Class declaration
    7. class Objects{
    8.  
    9. //Attributes
    10. String name;
    11. int size;
    12. String description;
    13. boolean condition;
    14.  
    15. //Constructors
    16. Objects(String name, int size, String description){
    17. this.name = name;
    18. this.size = size;
    19. this.description = description;
    20. }
    21.  
    22. //Access Methods
    23. String getName(){
    24. return this.name;
    25. }
    26.  
    27. void setName(String name){
    28. this.name = name;
    29. }
    30.  
    31. //Methods
    32. void increment(){
    33. this.size++;
    34. }
    35. }
    36.