Is class an Object? Is object a class?

Answer Posted / julian c

Stop thinking like programmers saying "Object is a class in Java, c# etc".

I have in front of me a number of Whiffleplops of different colours; black, blue and red.

The black, blue and red Whiffleplops are three different objects. They are also of different sizes and I can play with them.

Do you have a Whiffleplop with you? No? (Why not).

Do you see that Whiffleplop is a CLASS of object that I can define as having two attributes (colour and size) and behaviour (you can play with it)? When you do get a Whiffleplop of any size or colour then you'll have an object, or an instance of the Whiffleplop class. You don;t have to have one for me to define the class though!

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which oops concept is used as reuse mechanism?

2881


What is static polymorphism?

683


How to define an interface?

580


What are the four important foundation concepts of OOP ?

546


What is garbage collection(gc)?

567






Explain the abstract class modifier?

482


Difference between class and an object?

579


What is an abstraction and why is it important?

575


What is the function of pure virtual functions?

514


What is the difference abstract class and interface?

529


Explain the term constructor

621


Explain about overriding polymorphism?

583


What are manipulators?

644


Explain about the design phase?

587


How many methods are there in the externalizable interface?

553