What is the difference between vegetable and fruit?
A true fruit is a ripened ovary that usually starts ripening when it is fertilized. And vegetable is any vegetative part of the plant which is edible and contains stored food probably in the form of starch.
These definitions are not exact as there are a lot of fruits which are fruits but do not strictly follow the given definition. See Syconus, Composite fruits, Sorosis.etc

Classification is based on several different criteria, for example the mode of reproduction, arrangement and design of flowering parts and flowers and also on the basis of habitat and habit.