The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

what is class?

A Class is a set of variables (called properties) and functions (called methods) that works together to define a "template" for generating an entity called object which excecute a well-known tasks and/or operations. Let's take a "though" example :
Imagine we want to design a game. In this game we want to create two players "Alice" (Female) and "Bob" (Male).
In this senario, instead of doing so explicitaly, smarter way is to build a generic class that we call "Player" and that has a property called "sex". Thus creating Alice whould be a simple "instance" of the class Player with the property sex set to "Female". Same way creating Bob is creating an object from the generic Player class with the property sex set to "Male". :D :) ;)
 
MI
Back