Write down a class grade with a method getnumericgrade

Assignment Help Computer Engineering
Reference no: EM1329536

Write a Java program that translates a letter grade into a number grade. Letter grades are A B C D F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by 0.3, a - decreases it by 0.3. However, an A+ has the value 4.0. All other inputs have value -1.

A sample session could look like following.

Enter a letter grade:
B-
Numeric value: 2.7.

Write a class Grade with a method getNumericGrade.

Use the following class as your main class:

import java.util.Scanner;

/**
This class prints the numeric value of a letter grade given by the user.
*/
public class GradePrinter
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.println("Enter a letter grade:");
String input = in.nextLine();
Grade g = new Grade(input);
double grade = g.getNumericGrade();
System.out.println("Numeric value: " + grade);
}
}

Reference no: EM1329536

Questions Cloud

Leadership style of cluster emulated by american leaders : What parts of the leadership style of the cluster you selected do you believe should be emulated by American leaders?
Improve supply chain and quality : Recommendation for improving supply chain and quality - This meeting will be held on the discussion board and you are expected to bring recommendations that address the underlying issues of the various problems.
Discuss the win-win strategy : Discuss the win-win strategy in business. Give an example of one.
Explain how does the federal reserve accomplish : Explain how does the Federal Reserve accomplish these goals.
Write down a class grade with a method getnumericgrade : note down  a Java program that translates a letter grade into a number grade. Letter grades are A B C D F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by 0.3, a - d..
Discussing the case significance : Describe the facts of the case. This should include the results from the trial court and any intermediate appellate courts. Give a short summary of what each appellate court held and why.
A good definition of standard deviation : A good definition of standard deviation and a full explanation of the concept, with a good example. Thanks!
Explain electronic wallets and the itm : Explain Electronic wallets and the ITM and Explain what electronic wallets are and how they can be useful to consumers
Write a recursive process called productarray : Write a recursive method called productArray that takes an array of integers, a start index and an end index and returns the product of elements of the array.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Detemining the ciphertext

Explain the ciphertext (in binary form) produced by the encryption of character. Explain what will the plaintext if ciphertext is 01111101.

  Express and give an example of a web database.

Explain the difference between system design and system analysis.

  Listing the significant investigative approaches

What do you think are the most significant investigative approaches in preparation for these cyber crime cases and what could be the result of the poor investigator planning and preparation before start of the digital evidence collection, and proc..

  What mean to take a systems view of a project

What does it mean to take a systems view of a project? How does taking the systems view of a project apply to project management.

  Security policy document project

Analyze security requirements and develop a security policy

  Describing the car structure

Write down a definition statement which describes a Car structure variable initialized along with the following information: Make: Ford Model: Mustang.

  Determining the cpi of computer

A workstation utilizes a 15-MHZ processor with a claimed 10-MIPS rating to implement a provided programme mix. Suppose a one-cycle delay for every memory access. What is effective CPI of this computer?

  Finding percentage and final grade of students

You have been asked to develop a program which will enable a teacher to determine the percentage and the final grade for students in the class.

  What business applications may find roles useful

What business applications may find roles useful.

  A function to see if one list is a shallow copy of other

A function to see if one list is a shallow copy of other

  Using a while structure for designing pseudocode

By using a WHILE structure for designing the pseudocode in order to prepare a monthly report for the legal clinic.

  Determine one protocol which works at the osi layer 2

suppose you are Dave Baker, the Senior System Administrator from Minnesota Consulting Group (MCG). The company with which MCG has an ongoing contract wishes to have some basic TCP/IP concepts explained to senior decision-makers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd