0
What is class?
4 ответов
+ 3
class is grouping of objects having identical properties, common behavior and shard relationship...
eg: apple is a object
then fruit is a class
+ 2
class is collection of variable and mathod/functions.
there are divided into two part's
1. private section
2. public section
ex..
class student
{
private:
int rollno;
int marks;
public:
void getinfo()
{
cin>>rollno;
cin>>marks;
}
};
here,,
class name is student
two variable. marks,rollno
mathod is void getinfo
0
Class is a collection of objects .
For eg:vehicle is a class and BMW,Mercedes are its objects
0
class is the map of the prgm.
bt without its object it will have no meaning .
like whenever u are going to construct ur building
than first u draw its map than u collect all the construction materials . without it u won't able to construct building