Multiple Bouncing Balls: OOP in Processing, pt. 1 - Computers4Kids

preview_player
Показать описание
In this video, we introduce the idea of creating a class that describes a our bouncing ball, in order to easily create many instances of that object. This is known as Object-Oriented Programming (OOP). In the next video, we will create a class for a Ball which will be able to do everything our original bouncing ball could.

Timestamps:
0:42 Approaches to implementing multiple bouncing balls
2:15 What is Object-Oriented Programming?
3:01 Why is OOP important?
Рекомендации по теме
Комментарии
Автор

hey, I have a question. I have written two classes and gotten two balls with different random velocity, start points and radius which bounce as per usual. I want them to stick together when they collide, adjust the velocity to the average velocity, move together and bounce off the walls together, still stuck in the same position. I have the dist. equation but I am not sure how to put it into the class format and I can't figure out how to make the balls bounce together. please help?

angel-rqle