Boyz N the Hood

In 1984, Tre Styles lives with his divorced single mother, Reva in Inglewood, California. After Tre gets in a fight at school, his teacher informs Reva that Tre is highly intelligent but has a volatile temper and lacks respect. Worried about Tre's future, Reva sends him to live in the Crenshaw neighborhood of South Central Los Angeles with his father, Furious Styles, from whom she hopes Tre will learn valuable life lessons. In Crenshaw, Tre reunites with his friends, Darrin "Doughboy" Baker, Doughboy's maternal half-brother Ricky, and Chris, their mutual friend. That night, Tre hears his father shooting at a burglar who tried to steal from the house. Two policemen arrive an hour later, and while the white officer is civil, the black officer treats Furious with disrespect and contempt. The next day, Tre and his friends go out with Chris who shows them a dead body. While there, a group of older Crip gang members steal Ricky's football and Doughboy aggressively tries to get it back but is easily defeated. While the boys walk away, one of the members gives Ricky back his ball and a frustrated Doughboy says he is going with Chris to the store. Later in the day, Furious spends quality time with Tre, taking him to the seaside for fishing and telling the boy more about his life story, including the time that he even went to Vietnam in hopes of making his boy proud of him. He concludes by advising Tre to not ever join the army, stating that the black man has no place in the army. While returning home, they see Doughboy and Chris getting arrested for stealing something at the store, while Ricky and Tre look on.
The film then jumps forward to seven years later. At a backyard party, Doughboy is now a Crip and is celebrating his recent release from jail, along with most of his friends, including Chris, who is now in a wheelchair from a gunshot wound, and new friends Dooky and Monster, also Crips. Ricky, now a star running back for Crenshaw High School, lives with his mother Brenda, girlfriend Shanice, and their infant son. Tre has grown into a mature and responsible teenager, works at a clothing store at the local mall, and hopes to attend college with his girlfriend, Brandi.
Furious takes Tre and Ricky to Compton to talk about the dangers of decreasing property values in the black community. That night, during a local street racing gathering, Ricky is provoked by Ferris, a member of the Bloods. In response, Doughboy brandishes his handgun, leading to a brief argument between the two gangs. While the two gangs were done arguing, Ferris shoots his gun in the air to signal everyone to leave. While Tre talks about leaving Los Angeles, he and Ricky are pulled over by the police. The lead officer, the same one who was disrespectful to Furious seven years earlier, deliberately intimidates and threatens Tre with his gun, knowing he can't do anything. Distraught, Tre goes to Brandi's house, where he finally breaks down. After she consoles him, they have sex for the first time.
The next day, Ricky has a fight with Doughboy, with Brenda quickly taking Ricky's side and berating Doughboy. While Ricky and Tre walk to a nearby store, they see Ferris and his gang driving around the neighborhood and to avoid them, cut through back alleys and separate. Ferris's car closes in on Ricky, and one of Ferris's gang members guns Ricky down, killing him. Both Tre and Doughboy's gang catch up to the location of the shooting. Helpless, Tre and Doughboy carry Ricky's lifeless body back home. When Brenda and Shanice find out that Ricky is dead, they hysterically blame Doughboy, who unsuccessfully tries to comfort them. That night, Brenda sobs over Ricky's SAT results, discovering he scored just enough to qualify for the USC scholarship he wanted.
The remaining boys vow vengeance on Ferris and his group. Furious finds Tre preparing to take Furious's revolver, but convinces Tre to abandon his plans for revenge. However, Brandi and Furious catch Tre sneaking out of his bedroom window to join Doughboy. That night, as the gang drives around the city, Tre asks to be let out of the car and returns home, realizing that his father was right to keep him from falling into a cycle of violence. When Tre gets back, Furious is waiting for him; they look at each other without saying a word, and then Furious retreats to his bedroom. Doughboy finds Ferris's gang at a local fast food restaurant, and Monster opens fire on them, killing one and wounding the other two. Doughboy gets out and personally executes the other wounded gang member and Ferris, avenging Ricky's death.
The next day, Doughboy visits Tre, now understanding Tre's reasons for abandoning the gang. Doughboy knows that he will soon face retaliation for Ferris' death, and accepts the consequences of his crime-ridden life. He plaintively questions why America "don't know, don't show, or don't care about what's going on in the hood". He sorrowfully says that he has no brothers left now after Ricky's death, but is embraced by Tre, who says to Doughboy "You still got one brother left."
The epilogue reveals that Doughboy saw Ricky buried the next day and was murdered two weeks later. Tre and Brandi resume their relationship, and go on to attend Morehouse and Spelman Colleges in Atlanta, respectively. This closes the film.

Question: Who kills Ferris?
Answer: Doughboy