If you're down to the end of a good ham, here's something to try.
Finish slicing what you can for sandwiches, put that away so you won't snack it all away while you're cooking) then trim the rest off and cut it in small to middling pieces.
Peel as few potatoes as you'll want, slice and set to boil.
Chop up enough onion to season your potatoes (freeze the rest for later) and sautéed in butter till translucent.
Peel and chop a few apples (4-5) or so, and sauté them too, with butter and some brown sugar (in another pan, by the way).
Toss the ham in with the onions, and heat it up.
Drain the potatoes; by now, they should be mostly cooked: they don't need to be real soft, since we'll be baking them too. Toss some butter in and toss the potatoes to coat (if you have butter issues, you probably shouldn't be reading this ;-)
Somewhere in here you can season with salt, pepper, maybe some lemon pepper? Whatever floats your boat.
Put potatoes in the fry pan with the onion and ham and stir-fry for a few minutes to mix the flavors well, then lay in your casserole pan.
Cover with the fried apples, dot with some more butter if you're feeling brave, and sprinkle with grated cheese.
Bake in a low oven (or one of those mounted in the wall at eye level) as long as the temp is about 325 degrees for about 30-40 minutes, or until the smell becomes irresistible.
leftover ham stump
potatoes, peeled and sliced
apples, peeled and chopped