Twelve middle-school girls hovering around a lab table at the U.S. Naval Academy on Saturday had just begun testing the artificial heart valves they’d built out of rubber tubing and a piece of latex glove when Cmdr. Jill Richards bounded up.

“Who wants to be a biomedical engineer?” whooped Richards, who usually teaches Navy weapons systems classes. “It’s so cool!”

The enthusiasm wasn’t lost on 12-year-old Katie Tyndall, a sixth-grader from Wilmington, Del., who pronounced the heart-valve testing “really fun.” Nor did Katie miss the fact that the day-long program focused on careers in the sciences, technology, engineering and math — known as the “STEM” fields — was girls-only.

“I think they’re trying to show us that girls can do anything we want to do, not just the boys,” she said.

The workshops, attended by 230 middle-school students from the Washington area and beyond, were part of the academy’s broader effort to steer more young people into the STEM disciplines. The problem: The career fields that the Navy relies upon are ones that many girls drift away from after elementary school. The academy has hosted girls-only events since 2007.

Professor Angela Moran, chair of the academy’s STEM program, noted that although 20 percent of the academy’s undergraduates are female, they make up only 10 to 12 percent of its engineering majors.

“All the research shows this is the age where [girls] get the concept of their self-image and make decisions based on what their peers think,” Moran said.

“They’re very aware of what other people are doing, and they don’t want to consider things that are abstract to them or difficult. They get a lot of messages about what girls can’t do,” she added.

Workshop leaders tapped into many girls’ desire to help people, Moran said, while urging them to explore careers beyond the more familiar jobs of veterinarian, doctor and nurse. The academy’s faculty members — mostly women — and female midshipmen who led the classes also shared personal details: how they had children, climbed mountains for fun or liked to wear sparkly shoes.

“It shows them we’re not all a bunch of nerds who run around in lab coats and do nerd things,” said Lt. Meredith Botnick, an aerospace engineer who helped the girls design and launch “rockets” made from drinking straws. “They see ‘I can have a family,’ and ‘I can still be girly.’ ”

The girls dissected sheep hearts, took each other’s blood pressure, tested the weight-bearing capacity of their bridge designs and programmed Lego robots to navigate through a maze.

Lacey Pasco, 13, of Annapolis, gasped when she learned during a bioterrorism workshop that she was one of the victims of a simulated smallpox outbreak.

“I’m infected! Oh, no — I’m going to die!” she said, giggling.

Lacey, a seventh-grader at Wiley H. Bates Middle School in Annapolis, said she learned that it was epidemiologists and lab scientists who would track down such an outbreak, not only police detectives, as she’d seen on television.

“It’s different from my regular science class in school,” she said of the bioterrorism class. “I like to see how science works in the real world and how important it is.”

Impressing middle-school girls, of course, takes a certain approach. Whose voice sang over a PowerPoint presentation showing women in science and technology jobs? Katy Perry’s, of course. Richards described the body’s interconnected systems in terms of the heart and lungs being “BFFs,” which — duh — means “best friends forever.” Workshop swag included rainbow-colored rubber bracelets and bright pink and teal knapsacks.

Botnick made sure the girls in her rocket science workshop spoke up when they shouted, “Fire in the hole!” before launching their straw-rockets toward a target 75 feet away.

“Anyone want to be a rocket scientist now?” Botnick asked the dozen girls waiting in line to launch.

A few hands went up.

“It’s fun,” Botnick told them. “You get to light stuff on fire and watch stuff fly!”

Yasemin Schmitt, 11, a sixth-grader from New York, said she liked the girls-only aspect of the day.

“I think you need to focus on girls because girls have a lot of great ideas,” she said. “I think we could all benefit from it. Tons of girls like to [study science, math and technology], but sometimes they think they can’t. But we’re just as capable as boys.”

As Lucy Buda, a sixth-grader who attends Lime Kiln Middle School in Fulton, Md., said before heading off to redesign her rocket: “Normally, everyone thinks boys are smarter.”

The event was free and funded through more than $10,000 in in-kind donations and grants from foundations and the Department of Defense, Moran said. The academy’s faculty and undergraduates volunteered their time.

“I love working with girls this age,” Richards said, before she turned to a table of sheep hearts awaiting 12-year-olds with scalpels. “The world is open to them, and they need to know that.”