Give one example to illustrate a real world class and an object.
Answers
Answered by
0
Answer:
Real Life Examples of Object Oriented Programming
•Class - Consider a Harmonium.
•Object.
•Object has characteristics as :
•Example - a car, a person, hard disk, pen, bank account. State of an object. ...
•Dynamic.
•Behavior of an object. ...
•Identity of an object.
•Employee - Empid, Name, Gender, Mobile_No.
Answered by
0
Answer:
For example: in real life, a car is an object. The car has attributes, such as weight and color, and methods, such as drive and brake. A Class is like an object constructor, or a "blueprint" for creating objects.
Similar questions
Hindi,
1 month ago
English,
1 month ago
Social Sciences,
2 months ago
Math,
9 months ago
History,
9 months ago