CSE 5J Lecture Notes - Lecture 8: Special Functions
Document Summary
8. 2 using an object: object-oriented programming allows us to take all of the variables and function out of the main program and store them inside an object. It is where you give the instructions on how to set up the object. Car mycar = new car();: functionality, we can add functionality to our object by writing methods. 8. 4 using an object: the details: step 1. But an object may contain multiple pieces of data. If you forget to initialize an object, processing will give it the value null: step 3. Using an object: using an object involves calling functions that are built into that object, calling a method inside of an object is accomplished via dot syntax, variablename. objectmethod(method arguments); 8. 7 objects are data types too: classes are data types just like integers and floats, objects can also be passed in as arguments to a function.