March 2018
Intermediate to advanced
183 pages
2h 34m
English
A class is a template used to create objects. To define a class, you use the keyword class followed by a name, a code block, and a semicolon. The naming convention for classes is mixed case, meaning that each word should be initially capitalized.
Class members can be declared inside the class; the two main kinds are fields and methods. Fields are variables and they hold the state of the object. Methods are functions and they define what the object can do.
A method belonging to a class is normally declared as a prototype inside ...