Classes and Objects

What is the relationship Between Classes and Objects?

Questions by yamxxx

Showing Answers 1 - 12 of 12 Answers

PNVRKPrasad

  • Jul 20th, 2009
 

Class: Programmer puts the definition of code into a class which we can treat as a plastic mould. Class is defined at design time. A class gives the programmatic logic.
Object: Plastic products are created using a mould; objects are instantiated at run time by using the Class definition. An object is a copy of a class which will be filled with data at run time. An object can be created for handling each user request or for a user or there can be a singleton class which will have only one instance (object) that serves all the requests.

  Was this answer useful?  Yes

The relationship between Classes and Objects can be defined in the easy way as The relationship between Maruti and a particular Maruti 800 DL 12 H 2343, implies when we talk about Maruti it gives us sense that we are talking about car but a numbered car can explain about which car we are talking about. the common thing is that both have the same functionality but from Maruti we can't recognize anything uniquely but Maruti 800 DL 12 H 2343 gives us a unique object. In the same way we can considered Class as a bundle of Data Functions and Members which holds the definitions about how its class's object will work. and object performs the tasks by showing or following there behavior which is stated in the class. 

  Was this answer useful?  Yes

amarkartu

  • Dec 23rd, 2009
 

Class:

1. Is a logical construct which defines the shape and nature of an object.
2. Is a Template for an object.

Object:

1. Is a real time entity.
2. Is a instance of class.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions