COMPUTER 4Q G8

Subdecks (1)

Cards (23)

  • Global Variables are declared outside any function, they have a global scope and thus are available for any function in the program, including main.
  • Local variables are within/inside the function only
  • Scope refers to the section of code where a variable is allowed to be accessed or referenced.
  • Pass-by-reference method states that parameters that will only accept values from other functions of the program
  • Overloading Functions states that it is valid to give several functions the same name, it only has to have a different set of parameters.
  • Function overloading allows the function to have many forms
  • Function polymorphism allows functions to be overloaded
    • The area of a circle is computed using the equation 3.14*r2(r = radius)​
    • The area of a square is computed using the equation s² (s = length of one side)​
    • The area of a rectangle is computed using the equation 1*w (length x width)​
  • Pass-by-value method- Parameters only accept values passed on to them
  • Arguments- Values which may be variables passed on to functions
  • Function declaration- a way to identify data types
  • Class- representation of abstract data
  • Constructor- Object of the class is created
  • Destructor- Object is destroyed
  • Accessor methods- Allow access to data members