It's midterm exam day for the midshipmen taking the U.S. Naval Academy's course on classical warfare. After spending the semester with such books as "The Western Way of War" and "The Landmark Thucydides," the half-dozen students in Room 114 of Samson Hall open their light blue books and plunge into the questions.

"Why did the Peloponnesian War last 27 years once both sides realized that their respective strategies were not leading to victory?" one of the essay questions asks. For extra credit, "draw in detail a Spartan."

The mids study wars fought long ago, but they've also steeled themselves for the one at hand. This is the way it has always been at the 158-year-old academy: If you want peace, prepare for war. The 4,000-strong brigade may study mathematics, literature and economics, but when the midshipmen graduate they will be Marines, naval fighter pilots and submarine officers. They're ready to get to work, and questions about U.S. justification for deposing Iraqi President Saddam Hussein are, for the most part, not on their screen.

"I don't think that's our focus, whether or not it's a just war," said Mathison Hall, commander of the Brigade of Midshipmen and the highest-ranking student at the academy. He could well be on the front lines in Iraq as a Marine second lieutenant after his graduation this spring.

"My focus right now is: We may be going to fight a madman. How am I going to lead my troops into battle?" he said. "Thirty years from now, when we're generals, admirals and senators, we'll be focused on the reasons for going to war.

"We don't want to breed robots, but at the same time we follow our orders."

But even the academy is not immune to some of the popular dissent surrounding Iraq. The life of the men and women in the crisp black uniforms of the midshipman has changed, especially when they venture outside the brick walls. In some places they'll get free drinks and compliments from veterans; in others, dirty looks from peace protesters or hostility from former friends. At least a couple have gotten the heave-ho from girlfriends upset about the war.

Even inside the walls, excitement over the chance to use skills they've learned is sometimes tempered by ambivalence. Contact with those opposed to invasion, whether they are civilian professors or old high school friends, only heightens the tension between duty and conscience.

The academy is not an ivory tower. Plebes are responsible for reading three newspaper articles a day and receive regular quizzes from upperclassmen on current events. Much of the discussion about war takes place in King Hall, where the midshipmen eat meals with their squads.

But some carry it further, like the inquisitive third-year midshipman who ventured to a recent peace march in the District. He spoke on condition of anonymity because talking to reporters is forbidden without official clearance.

He said that though he supports an attack on Iraq he went to the protest anyway, out of curiosity. "I just wanted to see what it was about," said the mid, whose father graduated from Stanford University in 1968 and served in Vietnam. "I was thinking, this is cool. This is democracy in action."

Being a midshipman, though, has its complications. "I've got an ex-girlfriend in Wellesley and another in Columbia, and they won't talk to me" because they are opposed to the war, he said. "I have to assume I'm going to be a part of this conflict, and if I'm doing that I want to understand other people's concerns."

Military historian Victor Davis Hanson, a visiting civilian professor, said he appreciates the curiosity of his students, who are mostly in their early twenties. "They're no different than any young people, so they're quite candid," Hanson said. In fact, he estimates that a fourth of the midshipmen are unsure of the reasons for war in Iraq.

"I had two of them in class that went to the protest in Washington," he said. "In some ways they are my best students."

He said his colleagues on the civilian faculty were even more inclined to object to the war. "I would say 75 percent of the civilians are very skeptical of the present administration, and even more skeptical in particular of the need to go to Iraq," he said.

Still, Hall and the anonymous midshipman sounded a common chord: a sense of nervous excitement at getting to serve their country.

"I don't think anybody wants war," Hall said. "I just think they want the opportunity to do what they're trained for."

And they're not worried about the war in Iraq ending before they get an opportunity to exercise their skills. They view it as only one battlefield in a larger war against terrorism that began Sept. 11, 2001.

Hall remembers that day vividly.

"The classes stopped," Hall said. "You could feel the tension rising in the room. It wasn't the reaction I expected -- 'Let's go kill them all.' It was, 'Wow, we're going into combat.'

"It was the first time it hit home, the purpose of why we are here."

That purpose is borne out in the academic and physical demands made of the midshipmen during their four years in the academy.

Hanson, a soft-spoken man who wrote op-ed pieces predicting the rapid U.S. sweep through Afghanistan and backing an invasion of Iraq, has relished his year at the school.

"Here at the Naval Academy, there still seem to be people who have confidence in our culture," he said. "By that I don't mean a mindless nationalism and chauvinism but a very critical and more or less unswerving idea that America is a very different place. And they're not apologetic about it."

An hour later, Agur Adams is getting ready for the fight of his life. The smack of leather on leather echoes inside the academy's boxing gym in MacDonough Hall, where a heavy bag rocks violently under the blows from his gloved fists. His hooks and jabs ripple out in musical two- and three-punch combinations, accompanied by the sharp exhalations of the fighter: Ffff. Whap. Ffff. Whap.

Each impact leaves a dent, and every punch brings the 165-pound electronic engineering and computer science major from Northeast Washington closer to winning the academy's boxing championship. It also prepares him for the war he may face when he graduates in May and dons the gold bars of a Marine second lieutenant.

"This is what you've been working for for the last four years," he said. "If that means going to Iraq and doing my business there, I'll be ready."

Midshipman Agur Adams of Northeast Washington plans for a more-imminent fight: the school boxing championship.Professor Victor Davis Hanson leads midshipmen Ben Keeter, Alex Martin, Gordon Schmidt and Chris O'Connor in discussion of classical Greek warfare.