The reason Lockheed is doing badly is due to two effects that really are not in play for Apple. First, pension costs continue to drag down the companies earnings reflecting a legacy workforce for a large manufacturing based company. Second is that Lockheed is losing earnings through protest of contract awards. In one case the contract will be re-competed so Lockheed may never see any money from it. This is not a concern for Apple as they compete for sales with other companies, not contracts with the government. They also are a new company with a young workforce and probably never had a defined benefit pension plan.
Apple is doing well despite the downturn in the economy because they continue to put out new products that people want. Lockheed is struggling right now and most of the major defense contractors will over the next few years as the Obama Administration begins to cut back on spending in that area. The 2010 budget will probably be the peak of his first four years in office.
All-in-all it is an interesting comparison.