Theory:

A compound noun is a noun that is made up of two or more words.
Each word makes up part of the meaning of the noun. When two short words are written together, they always have the word stress on the first syllable.
Compound nouns can be written in three forms:
 
i) Closed-form: A single word
Example:
1. Girlfriend
2. Butterfly
3. Haircut
4. Toothpaste
5. Makeup
ii) Open form: two words
Example:
1. Garage door
2. Bus stop
3. Rain forest
4. Ice cream
5. Middle class
iii) Hyphenated form: hyphenated
Example:
1. Self-esteem
2. Brother-in-law
3. Sister-in-law
4. Mother-in-law
5. five-year-old
Important!
A compound noun is the sum of its two parts. However, some words that aren't compound nouns even though they can be broken up into two words. One example is a compound adjective.
 
1. A half-eaten apple
(Half-eaten describes the apple, so it is an adjective, not a noun).
 
2. It was a terribly hot day.
(Terribly hot describes the day, so it is an adjective, not a noun).
 
3. It is an amazingly good idea.
(Amazingly good describes the idea, so it is an adjective, not a noun).