Question: This method creates a 2D array containing the percentage of of Black females, White females, Black males, and White males who were stopped for any

This method creates a 2D array containing the percentage of of Black females, White females, Black males, and White males who were stopped for any reason. This gives an idea if there is gender bias on any given year of stop and frisks.\ To complete this method:\ Access the specific year you are looking for in the database array.\ Create counters to keep track of the number of black people who were stopped, the number of white people who were stopped, as well as the number of black men who were stopped; the number of white men who were stopped, the number of black women who were stopped, and the number of white women who were stopped.\ Utilize the SFRecord getRace() method to identify a person's race\ If the race equals "

B

" (Black), increase the Black population count.\ If the race equals "

W

" (White), increase the White population count.\ Utilize the SFRecord getGender() method to identify a person's gender\ If the Arraylist contains "

F

" (Female), increase the Female count, accordingly.\ If the Arraylist contains "

M

" (Male), increase the Male count, accordingly.\ Create a 2D array of 2 rows and 3 columns containing the information in the table below. For example, to compute the Black Female Percentage use:\ percentage number of black females

/

number of black people

 This method creates a 2D array containing the percentage of of

This method creates a 2D array containing the percentage of of Black females, White females, Black males, and White males who were stopped for any reason. This gives an idea if there is gender bias on any given year of stop and frisks. To complete this method: 1. Access the specific year you are looking for in the database array. 2. Create counters to keep track of the number of black people who were stopped, the number of white people who were stopped, as well as the number of black men who were stopped; the number of white men who were stopped, the number of black women who were stopped, and the number of white women who were stopped. 1. Utilize the SFRecord getRace() method to identify a person's race 1. If the race equals " B " (Black), increase the Black population count. 2. If the race equals " W " (White), increase the White population count. 2. Utilize the SFRecord getGender() method to identify a person's gender 1. If the Arraylist contains "F" (Female), increase the Female count, accordingly. 2. If the Arraylist contains " M " (Male), increase the Male count, accordingly. 3. Create a 2D array of 2 rows and 3 columns containing the information in the table below. For example, to compute the Black Female Percentage use: 1. percentage =( number of black females / number of black people )0.5100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!