In
object-oriented programming, a
class is an extensible program-code-template for creating
objects, providing initial values for state (
member variables) and implementations of behavior (member functions or
methods). In many languages, the class name is used as the name for the class (the template itself), the name for the default
constructor of the class (a
subroutine that creates objects), and as the
type of objects generated by
instantiating the class; these distinct concepts are easily conflated.