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: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Which one of the following would administrators use to connect to a remote server securely for administration? a. telnetb. secure file transfer protocol (sftp)c. secure copy (scp)d. secure shell (ssh)
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
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
Mathematics, 06.05.2020 01:30
Questions on the website: 13722363