subject

You are on a team of developers writing a new teacher tool. The students names are stored in a 2D array called “seatingChart”. As part of the tool, a teacher can enter a list of names and the tool well return the number of students in the class found with names that matching provided list. For this problem you will be completing the ClassRoom class in the problem below. Your job is to complete the numberOfStudents found method. This method accepts an array of Strings that contain names and returns the quantity of students with those names. For example: Assume that a ClassRoom object named “computerScience” has been constructed and the seating chart contains the following names:

“Clarence”, “Florence”, “Ora”

“Bessie”, “Mabel”, “Milton”

“Ora”, “Cornelius”, “Adam”

When the following code executes:

String[] names = {"Clarence", "Ora", "Mr. Underwood"};
int namesFound = computerScience. numberOfStudents(names);
The contents of namesFound is 3 because Clarence is found once, Ora is found twice, and Mr. Underwood is not found at all. The total found would be 3.

Complete the numberOfStudents method
public class ClassRoom
{

private String[][] seatingChart;

//initializes the ClassRoom field seatingChart
public ClassRoom(String[][] s){
seatingChart = s;
}

//Precondition: the array of names will contain at least 1 name that may or may not be in the list
// the seating chart will be populated
//Postcondition: the method returns the number of names found in the seating chart

//TODO: Write the numberOfStudents method

public int numberOfStudents(String[] names){

}

public static void main(String[] args)
{
//DO NOT ENTER CODE HERE
//CHECK THE ACTUAL COLUMN FOR YOUR OUTPUT
System. out. println("Look in the Actual Column to see your results");
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 22:40
22. sata3 allows for data transfer rates of 600 mb/s. explain why you would likely not be able to copy data from one hard drive to another at anywhere close to this speed. also, what could be upgraded on the computer to achieve transfer speeds closer to 600 mb/s
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
You are on a team of developers writing a new teacher tool. The students names are stored in a 2D ar...
Questions
question
History, 25.03.2021 18:50
question
Mathematics, 25.03.2021 18:50
question
Mathematics, 25.03.2021 18:50
question
Mathematics, 25.03.2021 18:50
question
Mathematics, 25.03.2021 18:50
Questions on the website: 13722360