+ 3
What is a class
7 ответов
+ 4
a class is a plan think like the plan of a car
you define in it attributes like door tyres and the number of them
you also define methods as move use horn turn right etc
but you don't get a car until you make it
let us say you make a Nissan car
the Nissan car is an object of the class car
+ 3
Hello, rithwik chhugani !
Looking what class you mean, it can be class in css, or in java
In JAVA
Java - an object-oriented language, so the code in your programs will consist of objects and classes. Classes. Java allows you to create classes that represent objects from the real world. For example, you can create a class Car (car) or Animal (animal) and ask them different properties. For the Car class to create a logical properties such as doors, wheels, windshield, etc. With the Car class, you can create new classes of passenger cars, trucks, buses, that will have all the properties of the class Car, as well as its own properties. In the Animal class, respectively, you can set the properties of the Paw, Tail.
or in CSS
The class attribute specifies one or more classes for the element (under the element, there is a tag). This is done in order to then access a group of elements that have the same class, through CSS.
+ 3
In object oriented programming, oop, a class defines how to build instance objects of that class. The class is very similar to a set of instructions of how to build a house. The objects of this class would be Individual houses, which can differ in color the number of windows where the doors are. These are objects of the house class. In the house class you would find instructions to build things that all houses have in common. Such as roofs, walls, doors, windows and rooms. The instances objects of the house class could all have different floorplans different number of rooms different colored walls, but they all our houses.
I hope that helps, Rick
+ 1
In OOP
*Class is like a mini program or let's say template not like function class is more advanced it has festures like access modifiers, constructors, etc.
*We can only access class by object of that class.
*you can declare & define class on other file like xyz.h and use in main program by including it.
Ex: #include "xyz.h"
+ 1
class is a blue print.
It is just a plan of objects.
When we declare a object ,then the features of class is activated to that object.
0
class is the entity of objects that means.. let's take an example mango, apple, grapes are the objects that belongs to class fruits..
0
class defined the attributes and behavior of an object