From what i've seen:
If you get As in both quarters you can get an A, B or C on the final and get an A
An A and a B in the quarters, an A on the final will be an A, a B on the final will be a B.
B in both quarters, you will get a B even with an A on the final.
Basic rule of thumb is 2 out of 3 will determine the grade.