◦A fruit is the matured ovary of a flower, containing the seed.
◦A vegetable is considered to be edible roots, tubers, stems, leaves, fruits, seeds, flower clusters, and other softer plant parts.
◦ A grain is described the "seedlike fruits of the buckwheat and other plants, and the plants bearing such fruits." So, grain is also a fruit.
◦A nut is "a dry, one-seeded, usually oily fruit." The term nut also refers to any seed or fruit with a hard, brittle covering around an edible kernel, like the peanut, which is really a legume.
◦A legume is defined as "(the) name for any plant of the pulse family; more generally, any vegetable.
◦A pulse is "the common name for Leguminosae or Fabaceae, a large family of herbs, shrubs, and trees, also called the pea, or legume, family. "
Now if you've imagined a mental Venn diagram, classifying everything in it's place, it should resemble something like this: