Purchase Solution

Java Method for Converting Grades

Not what you're looking for?

Ask Custom Question

If the user enters 'numbers':
Get input for the grade number in decimal format. i.e. 74.22645 (enter it with 5 decimal places)
Utilize the Math class and round the number to zero decimal places, then use the int cast method to convert to an integer.
Utilize a switch statement to determine the corresponding letter grade.
Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers. Output the number in only 3 decimal places.

if the user enters 'letters':
Get input for the grade letter in String format.
Utilize a switch statement to determine the corresponding output for the letter entered. (ensure you accept both upper and lower case letters.
Use the grading criteria from this course for the numbers. (you must use charAt( ) so the string will work with your switch)
Output the corresponding numbers values for the letter entered along with the letter initially entered.

Purchase this Solution

Solution Summary

Solution attaches a Java class that will convert between letter and number grades.

Solution Preview

Dear Student,
You may modify the code to have initial selection to looking at the ...

Solution provided by:
Education
  • BSc (Hons), University of Colombo - Sri Lanka
  • MEngSc, University of Melbourne
  • Certificate IV in Training & Assessment , Australian Business Council
Recent Feedback
  • "Thank you!"
  • "Thank you."
  • "Thanks a lot for you help and support"
  • "Sorry about the late payment but the assignment was sufficient and appreciated. Good work"
  • "Great description! Thank you for your quick response."
Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.