A farmer divides his herd of $n$ cows among his four sons so that one son gets one-half the herd, a second son, one-fourth, a third son, one-fifth, and the fourth son, 7 cows.  Then $n$ is:
$ \textbf{(A)}\ 80 \qquad\textbf{(B)}\ 100\qquad\textbf{(C)}\ 140\qquad\textbf{(D)}\ 180\qquad\textbf{(E)}\ 240 $
1. Let \( n \) be the total number of cows.
2. According to the problem, the cows are divided as follows:
   - The first son gets \(\frac{1}{2}n\) cows.
   - The second son gets \(\frac{1}{4}n\) cows.
   - The third son gets \(\frac{1}{5}n\) cows.
   - The fourth son gets 7 cows.

3. The sum of all these parts must equal the total number of cows \( n \):
   \[
   \frac{1}{2}n + \frac{1}{4}n + \frac{1}{5}n + 7 = n
   \]

4. To solve for \( n \), first find a common denominator for the fractions. The least common multiple (LCM) of 2, 4, and 5 is 20. Rewrite the equation with a common denominator:
   \[
   \frac{10}{20}n + \frac{5}{20}n + \frac{4}{20}n + 7 = n
   \]

5. Combine the fractions:
   \[
   \left(\frac{10 + 5 + 4}{20}\right)n + 7 = n
   \]
   \[
   \frac{19}{20}n + 7 = n
   \]

6. Subtract \(\frac{19}{20}n\) from both sides to isolate \( n \):
   \[
   7 = n - \frac{19}{20}n
   \]
   \[
   7 = \frac{1}{20}n
   \]

7. Multiply both sides by 20 to solve for \( n \):
   \[
   n = 7 \times 20
   \]
   \[
   n = 140
   \]

The final answer is \(\boxed{140}\).