Variables store the state that the method is in, while the methods determine what the object can do.
An object can be anything, such as your car or a lottery game. A class is an abstract representation of an object. For example, a car can be represented by a class, while my Honda Civic will be an object of this type. Methods are used to draw the winning number and to let the players know what the winning number is. The variables and methods are represented using the class lottery .