Recitation 11: Workshops by Olivia Zhou

For this recitation,  I attended the workshop of Object Oriented Programming. We first reviewed some important definitions of OOP and then did the coding following professor Tristan’s instructions to have a more concrete understanding of it. In the coding session, we classed Person by assigning values to x, y, headSize, bodyHeight and name. We also used “void introduce” and “void display” to make those “people” show on the screen with their “self-introduction” on the console. Then we applied array function to the original code, similar to what we did in class. The last part is most interesting, it used mousePressed function to remove the “People” once it get clicked, I didn’t quite understand some terminological abbreviates at first, then I referred to the Processing website and finally got them. In the self exercise session, it suddenly came to me that I could combine this code with the colorful balls one which we did in class. The effect would be that ten random balls bouncing around and when I click them, they got blasted. Below are the screenshot video and the code.

Video

Code

Leave a Reply