Grade Converter
GradeConverter Application
-
Create a class and call it GradeConverter
- βΎ π src
- βΎ π¦ (default package)
-
π AreaAndPerimeterApp.java
-
π GradeConverter.java
-
π InvoiceApplication.java
-
π InvoiceApplicationV1.java
-
-
The user is asked to enter a grade (numerical value). If the value entered is not between 0 and 100, and error message is output.
- Otherwise the grade is converted to a String (>=85 is A, >=70 is B, >=55 is C, >=40 is D, <40 is βFailedβ)
- The result is printed.
- The user is asked to enter y or n to continue to enter another grade or to quit.
Console Output:
Welcome to the Letter Grade Converter
Enter numerical grade: -1
Error in grade input: -1
Continue? (y/n):
Less than 0 entered
Continue? (y/n): y
Enter numerical grade: 102
Error in grade input: 102
Continue? (y/n):
Greater than 100 entered.
Continue? (y/n): y
Enter numerical grade: 90
Letter grade: AContinue? (y/n):
Grade A
Enter numerical grade: 50
Letter grade: DContinue? (y/n):
Grade D
Enter numerical grade: 20
Letter grade: FailedContinue? (y/n):
Grade βFailedβ
Continue? (y/n): n
Enter βnβ