Help with weighted mean (Introductory stats)

Jada Hunt
1
> Beth is calculating her cumulative GPA. Her grades are as follows:
* A (12 hours)
* B (22 hours)
* C (14 hours)
* F (3 hours)
> Note that an A = 4.0, B = 3.0, C i= 2.0, and F = 0. What is Beth's GPA?
---
According to my textbook, the answer is 2.78. I'm just having a hard time understanding how to calculate a weighted mean with two sets of whole numbers.