difference between class and object

Answer Posted / manoj kumar

class is a blueprint or template for creating objects.class
is imaginary.it does not exits in real world .

while , object is an entity with some characteristic and
behavior.it is a real world entity .

In oops ,object is an entity that can store data value and
has its interface through its function.

we can create an object like that:

classname objectname=new classname();

example :

Rectangle s=new Rectangle();

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 main oop principles?

685


What is difference between oop and pop?

618


What is polymorphism used for?

574


Why is destructor used?

585


What is the fundamental idea of oop?

638






what type of question are asked in thoughtworks pair programming round ?

1763


How is class defined?

588


What language is oop?

596


What is polymorphism explain?

693


Why multiple inheritance is not allowed?

585


hi all..i want to know oops concepts clearly can any1 explain??

1683


What is encapsulation example?

550


What is multilevel inheritance in oop?

557


State what is encapsulation and friend function?

699


write a C++ program for booking using constructor and destructor.

2052