Object Oriented Programming : What are Objects and Classes?

Object Oriented Programming – OOP is very popular term in software and web development. Let’s talk about basic concepts of OOP – Objects andClasses. Objects and Classes techniques of OOP in modern programming languages make coding very powerful; contain inbuilt artificial intelligence components; enables code reusability; make code cleaner, efficient and compact.

You are wondering now : What are Objects and Classes?

Objects 

Objects are the preliminary elements of Object Oriented Programming that has a state and can perform actions. Object has inbuilt intelligence to interact with other elements, Objects of the same class or different.

Objects of the same class will posses common attributes. Objects are the fundamental building blocks of Object Oriented Programming applications concepts. Programmers use many objects of many different types in any application. Each different type of object comes from a specific class types.

Class

A class is a blueprint of an object. Consider class as a concept. Let’s take an example of a class Students. Now class Students will have common attribute that all the objects within the class will have in common.

Each Student object of a class Students will have Student ID, Student First Name, Student Last Name, Student Major, Grades etc. as their properties or attributes. That is how each object within the class will be identified.

Classes are extremely powerful technique in OOP programming. Consider the example of where you don’t want to use just one Student but a group of 100 students. Rather than describing each one in detail from scratch, you can use the Students class to create 100 objects of the type ‘Student’. You still have to give each one a name and other properties, but the basic structure of what a student remains the same.

 

 

 

Comments are closed.