0

What are the benefits of using objects?

3rd Mar 2017, 5:46 AM
Shahbaz Ahmad
Shahbaz Ahmad - avatar
2 Answers
+ 1
You can encapsulate informations. For example, if you want to create a space invader, you'll have to have lots of functions and arrays for the aliens such as their locations, some variables for the graphic display and functions to free the memory of everything. All this can be put in an Alien class. It will help not to mix everything in your code
3rd Mar 2017, 6:30 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
benefits of objects are to create different instances / occurance in programming. it also helps to match things according to their properties and behaviors accordingly.
3rd Mar 2017, 8:38 AM
Franky BrainBox
Franky BrainBox - avatar