99.1k views
3 votes
In object-oriented programming, what is a class?

2 Answers

1 vote

Answer:

In object-oriented programming, a class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).

The user-defined objects are created using the class keyword. The class is a blueprint that defines a nature of a future object. An instance is a specific object created from a particular class. Classes are used to create and manage new objects and support inheritance....a key ingredient in object-oriented programming and a mechanism of reusing code.

User Misha Moroshko
by
8.1k points
1 vote

Basically, a class in Object-oriented programming is a blueprint of an object. You can think of it as a concept and the object is the embodiment of that concept. It is a set of instructions to build a particular type of object and will normally define how an object will behave and what it will contain when it is instantiated.

User Sharifa
by
8.5k points

No related questions found