Your grade would be an 85%. The way you do the math is to add the 3 100% together to get 300%. Then you would add the 40% to the 300% to get 340%. After, you would divide that percentage by four since you added only four numbers. When you divided, you would get 85%.
The line is often referred to as the "line of best fit", this line is drawn so that more accurate conclusions can be drawn from given data. This has numerous uses across the sciences.