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 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Design a class tictactoe that: holds the following information about the game: two-dimensional array (3 by 3), and winner. add additional variables as needed. includes the functions to perform the various operations on objects. for example, function to print the board, getting the move, checking if move is valid, determining if there is a winner after each move. add additional operations as needed. includes constructor(s). write the functions of the class, and write a program that uses the class. the program should declare an object of type tictactoe. the program will create the board and store it in the array. the program will allow two players to play the tic-tac-toe game. after every valid move update the array, check if there is a winner. if there is no winner and no tie, then print the board again to continue.
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
You know the right answer?
Assume that two-dimensional arrays are used to store information about students' grades. the first i...
Questions
question
Mathematics, 02.02.2021 16:30
question
Mathematics, 02.02.2021 16:30
question
Social Studies, 02.02.2021 16:30
question
Mathematics, 02.02.2021 16:30
question
English, 02.02.2021 16:30
question
Mathematics, 02.02.2021 16:30
Questions on the website: 13722362