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

  Explain the importance of having a test coupled

Many will argue that it is considered a good practice to acknowledge the limitation of your research/project. Could you defend this argument.

  What is role of risk assessment

What is role of risk assessment

  Management systems do for sales and marketing

What can the knowledge management systems do for Sales and Marketing? What can they NOT do?

  Developing the function to list software installed on system

Write down a function which list the software (name and vendor) installed over the computer specified by the input argument. The function should output the list to screen and output the list to the CSV file.

  Give appropriate to string methods for all classes

create a class Employee with a name and salary.give appropriate to String methods for all classes

  Registers and risc processor

A RISC processor has 152 total registers, along with the 12 designated as global registers.

  What is the aim of a firewall

Name and explain two of the network devices used to create a network. What is the purpose of a firewall?

  Program to display temperature in table

Write down a C program that accepts three numbers input by the user, and outputs a table of the temperatures in Celsius, Fahrenheit, and Kelvin.

  How to research the development technologies

how to Research the development technologies below and type up a sum,mary of them.

  Assembly language version of c code

In MIPS assembly, write down an assembly language version of following C code segment: int A[10], B[10]; for (i=1; i

  Implementing gcd in assembly language

Implement this function in the assembly language and write down a test program which calls function many times, passing it several values. Show all results on screen and include screen shots of the outputs.

  How to create a database for music

How to create a database for music? Other entities will be Artist/Group - Attributes will be Name, Year Founded, Origin, Tones and Biography, Track - Attributes will be Number and User's Recommendation and finally Song - Attributes will be Name, ..

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