NEW YORK ( TheStreet) -- Companies such as iPhone maker Apple ( AAPL) and search firm Google ( GOOG) capture investors' attention because they do business in wildly growing markets. What happens when a company is tapped into two fast-growing fields?Cubic Corp. ( CUB), a small-cap stock, is just such a company. San Diego, Calif.-based Cubic is benefiting from two trends: providing military products and services, particularly in the areas of training and communications, as well as developing, installing and, in many cases, operating the fare-collection systems of mass-transit systems for 40 major markets on five continents, including New York and Washington, D.C. While defense offerings account for about 70% of revenue, operating profits are split almost 50/50 between defense and mass transit. The U.S. military has been undergoing a transformation from a Cold War-style, large-scale fighting regime to a more nimble, efficient force capable of effectively operating in a number of environments. Cubic offers both training services as well as virtual-training simulators, both of which directly address important needs of this transformation. Additionally, communications and information systems has become ever more necessary for internal coordination and surveillance of enemy forces. In the most recent quarter, Cubic's training systems and communications division posted revenue gains of 51% and 45%, respectively, from a year earlier. Mass-transit fare systems are also an attractive business. Higher gas prices have contributed to increased ridership in the U.S. Overseas, especially in Asia, rapid urbanization has been and will continue to be a trend. Mounting pollution problems combined with the low incomes of many new urbanites (i.e., those unable to afford a car), makes mass transit a necessity. Finally, many existing mass-transit systems have old, outdated fare systems that are ill-suited for intermodal (rail, bus, ferry, etc.) regional-transportation systems, and provide authorities no way to track the patterns of ridership. Cubic's smart-card-based systems make paying fares fast, accurate and secure. They also track valuable data relating to ridership patterns, helping mass-transit divisions plan efficiently. In the most recent quarter, Cubic's transportation division increased revenue 49%, and won a large new contract for Sydney, Australia. Cubic said this week that it won a contract with Karlsruhe, Germany, to create an Apple iPhone application to buy transit tickets. The city has almost 300,000 residents. Cubic has competitive advantages. The firm started as a defense contractor and has had a working relationship with the Department of Defense for 60 years. Contracting favors incumbents with established relationships and good track records. While the volume of business will always ebb and flow with government-spending priorities, it is a pretty good bet that Cubic will win their share of contracts.