How class & objects related real time

Showing Answers 1 - 15 of 15 Answers

Class is a template (combination of features and corresponding functionalities )of any real world entity and Object is instance of class.

Example: consider human is class and human will have properties called color, name , canWalk(),canEat()

Object is instance of class, assume that is instance of name Rahul, it will have following values color=whicte, name=rahul,canWalk()=No,canEat()=yes

  Was this answer useful?  Yes

sugumar

  • Jun 18th, 2012
 

car is a class and car key is a object

  Was this answer useful?  Yes

sivasankar reddy

  • Jul 3rd, 2012
 

Company ,Employee is a class. XYZ company ,sankar employee is obiect.

Code
  1. Class Company

  2. {

  3. methods

  4. variables

  5. }

  6. Class Employee

  7.  

  8. {

  9. methods

  10. variables

  11. }

  Was this answer useful?  Yes

amit

  • Jul 13th, 2016
 

Class is simply representation type of object. It is the blue print or plan that describe the details of an object. A class is composed three things a name, attribute and operations.

  Was this answer useful?  Yes

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