Class is defined as a logical entity that is a huge collection of objects and it also contains both methods and attributes.