school

thing1's amazing school repo
Log | Files | Refs | Submodules | README

oop (694B)


      1 attributes are vairables in classes
      2 methods are functions in classes
      3 
      4 instanciate -> create an instance of a class, will give you an object that you can interacte with
      5 
      6 a class is a bit like a function that returns a specific data structure
      7 
      8 a procedure changes an attribute in an object
      9 
     10 a function returns the value of an attribute
     11 
     12 a constructor is a function that initializes the object when you instanciate the class
     13 
     14 an attribute is a private variable, can only be changed using a procedure in the class
     15 
     16 a procedure or funtion is (normally) public, and can be acessed anywhere in code
     17 
     18 
     19 getters and setters
     20 a getter will return a value of an attribute
     21 
     22 a setter will set an attribute
     23 
     24 
     25