00:01
Hello, today we will be learning a program that calculates numeric and letter grades based on the given input.
00:08
First we will create a public class named grade that takes grade as a string and provides a method to retrieve the letter grade and corresponding numeric grade.
00:27
So, this is the complete code for the grade class.
00:30
We have a constructor named grade which takes input in the form of string and sets it as an instance variable.
00:41
Here it is setting it to an instance variable, temporary variable.
00:59
This is a constructor.
01:08
This is a method which simply in the get letter grade method, we simply return the grade as a string.
01:22
Here we have the return data type mentioned as well.
01:26
The get numeric grade is actually the method where the conversion from letter grade to numeric grade happens.
01:34
In this, we start by initializing the numeric grade to 0.
01:41
Next we use a switch statement to check the first character of the grade string.
01:45
If the first character is a, then the numeric grade is 4 .0...