At a time when doomsayers were predicting the demise of the housing industry and bankers feared a mortgage drought, the school systems of Montgomery and Prince George's counties put two new houses on the market.

But these are not your ordinary houses. They are very special creations to the high school students who built them from the ground up.

The opportunity to build the houses came through school programs in which students and teachers in each county start with an architectural plan, a lot of raw materials, an empty plot of ground and a big supply of determination.

The results are finished houses, which are sold to the highest bidder. Any profits are plowed back into the programs to help finance the next year's house.

In educators' jargon, these classes are "vocational education" or "on-the-job training." Students receive course credit for work done on the site.

But to the teen-agers in the classes, the instruction they receive in carpentry, bricklaying, plumbing, roofing and other trades is a ticket to a job and -- they hope -- trade union membership.

Prince George's County started its program three years ago at Gwynn Park High School, where students built a one-story house behind the school. That house was recently sold for $8,200 to the highest bidder, who owns property on which to locate the house. A spokesman for the purchasing department of Prince George's County school system estimated the cost of moving the house at about $5,000.

A local developer has donated a plot in Rosaryville for the next project, eliminating the need for the buyer to move the finished product. Next year's program will be expanded to include students from Crossland, Bladensburg and Laurel High schools. The county has hired an additional teacher to direct the class, in the hope that the project can be completed in one year.

The Montgomery County program is run by a nonprofit foundation composed of members of the real estate, banking and construction businesses. The foundation owns a city block on Linden Lane in Bethesda, on which students from 17 schools have built three houses. A fourth house is almost completed and will be offered for public bidding this summer.

This most recent effort by Montgomery County students is as ambitious as those undertaken in the three that preceded it. The fourth house has four bedrooms, a finished basement, a family room with a brick fireplace, a sun deck, a brick patio and luxuries such as a microwave oven, intercom in every room, 12 telephone outlets, a skylight in the master bedroom and a loft in another bedroom.

Michael Wilson, program coordinator, expects the house to sell for more than $175,000. He said he has to be "optimistic" about prospects for finding a buyer despite current high interest rates.

"Someone will come in who knows the tradition of what we've done," Wilson said. "The house is in a good location, hear NIH (the National Institutes of Health) and a Metro stop. For the price, it's a bargain. The custom features, the subtleties will all pop out when it's done."

The junior- and senior-class students who built the houses in Prince George's and Montgomery were born when the word "inflation" first began to creep into the American vocabulary. At one time, their school counselors might have urged them to pursue a liberal arts education in college. But now they set their sights on a trade.

James Grady, a senior at Gwynn Park, plans to go into carpentry after graduation.

"What I really liked about building the house was putting the shingles up, being up high in the sunny weather," Grady said. "But the insulation, that was a pain. "Up in that attic, it was 110 degrees."

Mike Montgomery, now a senior at Gwynn Park, recalled the aggravations involved in building the Prince George's house, such as hanging the closet doors, which he said "must have taken two weeks."

But Montgomery said his participation in the house-building program does not guarantee him a job. He is now training to be a fireman in a University of Maryland extension program.

"The county can't guarantee me a job," Montgomery said. "It's shaky now, with TRIM (Prince George's tax-limiting charter amendment). But (building the house) was fun."

Several students working on the Bethesda house said they hope to pursue careers in construction.

Marcellus Davis, a junior at Wootton High School, said he will work for pay on the Linden Land house during the summer, doing odd jobs to help complete the house.

The finishing touches Davis will make are indications of the enthusiasm and determination that have gone into the student-built house in both counties.

As Montgomery County site coordinator Gene Koons said of his students, "They go all out. Nothing's chintzy."