How to tell if a molecule will participate in hydrogen bonding with water? I was recently doing some organic chemistry work and came across a set of problems.

"Which of the following compounds will participate in hydrogen bonding with water? For each compound, indicate whether it will be a hydrogen bond donor, hydrogen bond acceptor, or both."

I do not have an idea of how to approach the first part of the question. Can someone help me with the first molecule: (a) $\ce{CH3CH2OCH3}$ in order of connectivity.
I figured out the answer. If there is a lone pair of electrons belonging to nitrogen, oxygen, or fluorine, then it is possible to bond to water. Therefore, it is can accept a hydrogen. If there is a hydrogen bonded to one of the three elements listed above, then it able to donate.