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, 22.06.2019 07:30
What type of computer network ensures high security ?
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
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
Questions on the website: 13722361