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

  Sorting the array

Write down a program which stores lists of the names (the last name first) and ages in parallel arrays and sorts names into alphabetical order keeping the ages along with the correct names.

  Decision-making process

Banner advertising on the Web sites helps activate the realization that there is a gap between the reality and desired state that happens in the --------------- stage of EC purchase decision-making process.

  Web search engine

Utilizing a Web search engine, determine an article from the reputable source published in the past six months which reports on relative risk that comes.

  Plan a use case diagram to represent actors

As Dewey Dezmal enters high-ceilinged, wood-paneled reading room of the Ruminski Public Library, a young woman, seated at a long, oak table, pokes her head out from behind the monitor, sees him and stands, saying, "Welcome. I'm Peri Otticle, the d..

  Define how you feel unit testing should be conducted

define how you feel unit testing should be conducted for a program with lots of conditional expressions.

  Avoiding breaches in health care information system

Analyze the financial and privacy impacts of the breaches to health care information systems and make at least two recommendations in order to prevent such breaches in future.

  What is bobs private key

What is Bob's private key?

  System analysis and design

In the System Analysis and Design: Mixing Techniques – The question “Whether the structured techniques and object-oriented techniques can be mixed.

  Why is the documentation plan important

What are three essential system components that may be used to devise an implementation strategy in your workplace.

  Create a class titled schooltextbook in java

Write the application with an array that holds 5 instances of the SchoolTextBook class, filled without prompting the user for input. Next prompt the used to enter a field for sorting, sort array of objects based on the user input.

  Design a data structure which supports two operations

Design a data structure which supports two operations 1. Insert(S, x) inserts x into S. 2. Remove-Duplicates(S) removes from S all duplicated values.

  Plan an er diagram

Plan an ER diagram

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