Joyanne D. Miller school fifth-grader Gabby Germann was brainstorming with Aileen Ryan, one of her two partners for a project in teacher Katalin Rosen's class, when an idea popped into her head.

Gabby, Aileen and classmate Alia Yannoe had devised a fictional bakery based in Milan, Italy, that they called Cake Pop Castle for the project. The three were to show off their business in a two-week mock trade show in their classroom, competing against their classmates' businesses for play money

A few weeks prior, Rosen's class had taken part in a fundraiser to buy a breathing device costing about $3,000 for Brian Mooney, a former Miller student and severe brain trauma patient at Eastern Shore Nursing and Rehabilitation in Cape May Court House. Mooney was a 17-year-old high school junior when he was struck by a car in June 2011.

Gabby, recalling Mooney's story, decided to help.

"I remembered that Mrs. Rosen told us there was this little boy that needed help for raising money for the machine," Gabby said. "I said, 'Aileen, why don't we donate? Why don't we raise money for the little boy?' and she was like, 'Oh yeah!'"

The girls made batch after batch of cake pops - balls of frosted cake skewered on a popsicle stick - which they sold in their neighborhoods and at the school. They also organized a raffle, giving away prizes of cake pops and, for a few lucky female winners, handmade duct-tape bows.

Inspired by the girls' example, other student businesses that made saleable goods donated their proceeds to the cause. Students and staffers from around the school started chipping in donations.

"Every day, kids would be coming up to my door, giving me a thing of quarters, pennies, whatever they found on the ground, and they would donate," Rosen said.

All told, the girls and their classmates were able to raise almost $340 to help Eastern Shore purchase equipment necessary for the care of its traumatic brain injury patients.

The girls' actions serve as a proof of concept for the culture of giving at Miller, which encourages students and teachers to support causes. Earlier this year, Rosen's students put on a play, raising $100 for a schoolwide fundraiser for Miller community members affected by Hurricane Sandy. The school also came together in early March to hold a weeklong dance contest for St. Baldrick's Foundation, raising $4,000 to help fund childhood cancer research.

While the students' generosity and giving spirit are heartwarming, not every part of this story has a happy ending. Mooney, who had been in a coma, died March 2.

The funds will be used to help others like him who depend on care at Eastern Shore for their quality of life.

Lorraine Holliday, of Eastern Shore's management company, Hospicomm, and Greta-Jo Payne, administrator at Eastern Shore, accepted the check on behalf of the center. Holliday said she and her colleagues were touched by the students' efforts to help their cause.

"It was overwhelming, the love and compassion that they demonstrated," Holliday said. "It's a beautiful thing."

Contact Braden Campbell: