My first wife was the cat behavior enforcer. A squirt bottle made sure there was complete understanding about which places were not allowed (dinner table, kitchen counters) and which were (couches, beds, shelves, dressers...).
My second (and final!) wife doesn't do cats. And visiting dogs don't do dinner tables.