What is Class?

A class is an organized store-house in object-oriented programming that gives coherent functional abilities to a group of related code. It is the definition of an object, made up of software code. Using classes, we may wrap data and behaviour together (Encapsulation). We may define classes in terms of classes (Inheritance). We can also override the behaviour of a class using an alternate behaviour (Polymorphism).
Using inheritance, we may assign different traits to different classes. Yet, the child classes will inherit some common traits from the base class.
A class may contain class members like fields, properties, events & methods with different types of access modifiers like private, public, protected or friend, to process the way they are accessed.

Tagged . Bookmark the permalink.

Leave a Reply