Explanation
In line 3 - 6, we have initialized name, phy, chem, and bio as public properties in the class initializer.
In line 9, we have then defined the totalObtained() method. In this method, we added individual marks of all the subjects and returned the sum.
At last in line 12, we defined percentage(). In this method, we called totalObtained() and used its value to calculate the percentage.
300
300
is the total number of marks for a student.