Submitted by Sure-Ad-5053 t3_z1wxoe in explainlikeimfive
Quite frankly getting lost with what the exact definitions are and the differences between them or when best to use them, can't find a single explanation online that dumbs it down enough for me to understand.
Zealous___Ideal t1_ixdafut wrote
Programming is tricky to explain to a 5 year old.
A class is like “all your toy trucks”
A constructor is “how does fisher-price make your trucks?”
Structs are a list of all the things on your truck: Its lights, its wheels, etc.
Methods are all the cool things your truck can do: Honk, back up, scare the dog.