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, 23.06.2019 09:30
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
In a heat transfer course, we can derive the equation for the temperature distribution in a flat rectangular plate. in this example, we will look at a plate at steadystate with three sides being held at t1, and one side held at t2. the temperature for any location on the plate, t(x,y), can be calculated by where create a function (prob3_5) that will take inputs of vectors x and y in feet, scalar n, scalars l and w in feet and scalars t1 and t2 in degrees fahrenheit. it will output a matrix t which is the temperature of each x and y locations. t will have the number of columns equal to the number of elements in x and rows equal to the number of elements in y. though this can be done without loops (perhaps more efficiently), your program must use a nested loop.
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
question
Mathematics, 16.01.2022 23:40
question
Mathematics, 16.01.2022 23:50
question
Mathematics, 16.01.2022 23:50