Coffee beans and cocoa beans are similar in their make – up. They share a component called caffeine which acts as a stimulant to the brain. Though the main stimulant in cocoa is Theobromine, a compound much like caffeine, cocoa does contain minute amounts of caffeine.
Beverages which contain caffeine are consumed to relieve or prevent drowsiness and to increase one’s energy level. Caffeine is extracted from the plant part used for making beverages by steeping it in water, a process called infusion.
Consumption of caffeine in one way or another reduces physical fatigue, drowsiness and helps one feel energetic, awake and active. The amount of caffeine required to bring this effect varies from person to person. Also, some evidence suggests that coffee does not produce the performance enhancing effects observed in other caffeine sources.
Theobromine on the other hand doesn’t affect the brain as much as caffeine does.
Therefore, theobromine has a lesser impact on the human central nervous system than caffeine. Theobromine stimulates the heart to a greater degree. While theobromine is not as addictive, it has been cited as possibly causing addiction to chocolate. Theobromine has also been identified as one of the compounds contributing to chocolate’s reputed role as an aphrodisiac.
So yes, coffee and cocoa are similar in a way, and different in another.
Source: Wikipedia article on Theobromine