Job Interviews OOP Concept

Object VS Class Top Programming Concept

Written by Techringe

List of Best Programming interviews Questions with Examples. Top OOP(Object Oriented Language) concepts with examples.Difference Between Object and Class.

Class

Class is Collection if Similar Objects

Example

class MyClass {       // The class
public:             // Access specifier
int myNum;        // Attribute (int variable)
string myString;  // Attribute (string variable)
};




Object

self-contained component which consists of methods and properties to make a particular type of data useful

Example

class MyClass {       // The class
public:             // Access specifier
int myNum;        // Attribute (int variable)
string myString;  // Attribute (string variable)
};

int main() {
MyClass myObj;  // Create an object of MyClass

}

 

About the author

Techringe

techringe.com is Platform which offers Free download latest project source code in java, android, php, html, c# .net, c/c++, iphone, vb, python, jsp, asp .net, all programming lanugage.

Leave a Comment