What is the relation between Classes and Objects?Class is a group of items, attributes of some entity. Object is any specific item that may or may not be a part of the class. When a class is created, objects for those classes are created.
Example : We create a Class “Food”. This class has attributes like ‘price’, ‘quantity’. For this food class, we create objects like “Spaghetti”, “Pasta”.
|