Retake Course

If I took college algebra as a senior in high school and received a D. But if I retake it and earn an A, does my GPA use the A in replace of the D?