What is a Class?

In Object Oriented Programming, a Class is a blueprint for an object. In fact, classes describe the type of objects, while objects are usable instances of classes. Each Object was built from the same set of blueprints and therefore contains the same components (properties and methods). A class can have any number of properties and methods to access the value of various kinds of methods.

What is a Class?

In real life, similar objects can be grouped based on some criteria. For example: A Ford car and a Toyota car are both Cars, so they can be classified as belonging to the Car class. There may be thousands of other Cars in existence, all of the same make and model. Each Car was built from the same set of blueprints and therefore contains the same components. In object-oriented terms, we can say that your car is an object (instance) of the class known as CAR. You can create different objects using the same class, because a class is just a template, while the objects are concrete instances, based on the template.

Object Oriented Programming representation of a Car Class

class Car { public string steering; public string brakes; public string tyres; public int forward() { // Write Your code here } public int backward() { // Write Your code here } }

Difference between the Class and Interface

A Class is a full body entity with members, methods along with there definition and implementation. An Interface is just a set of definition that you must implement in your Class inheriting that Interface. More about..... Class and Interface