I'm really confusing on classes. How to use it? How to code it? Anyone, feel free to explain it. :) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I'm really confusing on classes. How to use it? How to code it? Anyone, feel free to explain it. :)

31st Dec 2016, 6:12 PM
fazrina aznan
fazrina aznan - avatar
2 Answers
+ 1
Think of classes as a folder. (Replace the word folder woth class) and see if it makes sence. You can have many folders or classes. Sometimes you have folder a b c and d. In folder a you have folders aa and ab In in folder aa you have folder abc and zzw Folder aa is the parents of zzw and abc Folder a is the parents of aa Folder a can only use the content in folder aa and not directly access folder abc and zzw cause parents can only access the data directly from a child not a grand child. So folder aa can only access fold zzw and abd directly In the meanwhile folder b cant acces any of the other folders except for whats in folder b and so on. And main can access any of the disired folders that it needs to.
31st Dec 2016, 6:45 PM
Maximiliano Barona
0
wow! that make sense. thanks :) really appreciate it.
31st Dec 2016, 11:01 PM
fazrina aznan
fazrina aznan - avatar