Question: Translate this Java code into MIPS Assembly - This must be written as a switch statement. Use seq to check each case. Write a program

Translate this Java code into MIPS Assembly -This must be written as a switch statement. Use seq to check each case.

Write a program that implements the Grade Calculator shown below:

______________________________________________________________________

/** Grade Calculator receives a grade from the student and returns their letter grade

*/

public class GradeCalculator { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int percent; char grade; System.out.print("Enter your final grade percent > "); percent = stdin.nextInt(); switch(percent/10) { case 10 : case 9 : grade = 'A'; break; case 8 : grade = 'B'; break; case 7 : grade = 'C'; break; case 6 : grade = 'D'; break; default : grade = 'F'; } System.out.println("Your final grade is " + grade); } } _________________________________________________ 2) Your output should formatted as shown below:

Sample Output

Enter your final grade percent > 89 Your final grade is B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!