Kendra Bertucci, 18, pleaded guilty to two counts of assault with a semi-automatic weapon and making criminal threats, her attorney Jack Rauch said.
She will be sentenced to 11 years and eight months in prison on Oct. 19 as part of her plea agreement, Rauch said.
Joseph Misael Gonzalez-Barbosa, 17, who was prosecuted as an adult, pleaded guilty to four counts of assault with a semi-automatic weapon.
He will be sentenced on Oct. 19 to 10 years in prison on one of those four counts and for personal use of a firearm, his attorney Stephen Shaiken said.
Authorities said Gonzalez-Barbosa fired a .22-caliber semi-automatic rifle from the sunroof of a Honda driven by Bertucci, targeting a Toyota Sienna minivan occupied by Bertucci's ex-boyfriend, Jay Vecina.
Shaiken said Bertucci was angry because Vecina had broken up with her.
"It's clear the end of Kendra's relationship with Jay Vecina set this whole thing in motion," Shaiken said. "There's no question that was the motive for Kendra's anger, but there was no explanation for the shooting by my client."
"He said he didn't know why he did it. Young people get caught up in this and do something crazy and inexplicable," Shaiken said. "It was just a highly charged atmosphere. It makes no sense."
One of the teens inside the Toyota suffered a minor hand injury, Shaiken said. The defendants were initially charged with attempted murder and causing great bodily injury, Shaiken said.
"Under the circumstances, this was a fair resolution. The district attorney's office realized they had no juvenile criminal record and should be treated differently than adults," Shaiken said.
Shaiken said Bertucci obtained the gun and purchased the ammunition.