Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

9. Name eight tips for making claims and complaints.

Answered: 1 week ago

Question

11. Are your speaking notes helpful and effective?

Answered: 1 week ago

Question

The Goals of Informative Speaking Topics for Informative

Answered: 1 week ago