Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Convert{ /* Purpose: converts a given numerical grade to a letter grade * * Input : a number * * output : the
public class Convert{ /* Purpose: converts a given numerical grade to a letter grade * * Input : a number * * output : the letter grade (F, D-, D, ..., A+) corresponding to the * * input grade if the input is valid, "Invalid" otherwise */ public static String convertToLetter(double grade){ // // // Complete the definition of this method (and change the return value) // // return null; } }
Can i kindly get help with this java assignment
1: Grade Conversion [10 marks] In the provided Convert.java file, complete the two methods: convertToLetter and convertToGradePoint The interface (specification) of the methods are given below public static String convertToLetter (double grade) * Purpose: converts a given numerical grade to a letter grade * Input a number output : the letter grade (F, D-, D, A+) corresponding to the input grade if the input is valid, "Invalid" otherwise public static int convertToGradePoint (String letterGrade) * Purpose: converts a given letter grade to its equivalent grade point * *Input : A valid letter grade in the range D- to A+ (no F's) * output : The grade point corresponding to the input letter grade Use 0 for F and -1 for Invalid input : you MUST use a switch/case for this nethod *Note The conversion table is given as follows Grade Range Grade Point A+ 90, 100 85, 90 80, 85 77, 80 12 10 B+ B- C+ 70, 73 70 60, 63) 60 53, 57 50, 53) D- 50 Note that the range [a, b) means any number mean inclusive and parentheses mean exclusive. such that a sStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started