subject

Assume that two-dimensional arrays are used to store information about students' grades. the first is called studentscores and contains the students' numerical scores as integers. the other is studentletters and contains the corresponding letter grades as a string (i. e. "a", "b", "c", "d", or "f"). each row represents an individual student and each column a different assessment.
for example, if studentscores[0][0] contains 92, then the contents of studentletters[0][0] will contain the corresponding letter grade. in this case, the letter grade is a because the professor has used a standard grading scale. note that the professor might choose a different grading scale. do not assume scores of 90 or above are the letter grade a.
public class gradebook
{
private int[][] studentscores;
private string[][] studentletters;
// constructors not shown
// postcondition: returns โˆ’1.0 if lettergrade does not appear in studentletters
// otherwise, returns the average of all studentscores with corresponding
// studentletters values that are equal to the parameter lettergrade
public double letteraverage(string lettergrade)
{
}
// other methods not shown
}
write the method letteraverage. this method returns a double representing the average (arithmetic mean) of the student scores that correspond to a given letter grade. the method letteraverage returns โˆ’1.0 if none of the student scores corresponds to the given letter grade.
for example, given the following two-dimensional arrays:
studentscores: 96 72 84 65 89 60
78 86 75 61 85 73
studentletters: a c b d a d
b b c d b c
the method call letteraverage("b") would return the number 83.25, which is the average of the four scores that correspond to the letter grade b.
the method call letteraverage("f") would return โˆ’1.0 because none of the studentletters elements are equal to f.
complete the method letteraverage below. be sure to include the method header.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Janeโ€™s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
Assume that two-dimensional arrays are used to store information about students' grades. the first i...
Questions
question
Mathematics, 25.09.2019 07:00
question
Mathematics, 25.09.2019 07:00
question
Mathematics, 25.09.2019 07:00
Questions on the website: 13722363