to sed or awk, that is the question?

I have a text file with about 790 lines, at the end of many of the lines there is the text string 'f4' I want this text to be 'f2' What is the best way to do this? is it sed or awk? or something else? how? Also, there is maybe fifty occasions where f4 appears near the begining of the line that I want to stay f4. Also, each line is of variable length but usually has 3 to 5 words separated by spaces. I'll type an example of the file.
file.txt
--------
LINES variables text signs
LINES f3 f4
LINES constants text signs new/old
TEXT f4 new/old text f3 f4
.
.
.
LINES variables text signs f4
--------

In a sentence: If you see f4 at the end of a line, replace it with f2.

here is example of what i want finished file.txt to look like:
file.txt
--------
LINES variables text signs
LINES f3 f2
LINES constants text signs new/old
TEXT f4 new/old text f3 f2
.
.
.
LINES variables text signs f2
--------

Try this one