The first thing that needs to be done is to make sure the cat does not have a urinary tract infection. Peeing anywhere other than the litterbox is usually a sign the cat is sick. It's their way of telling you. Is the cat spayed/neutered. If not, WHY NOT??? Unneutered males are aggressive and territorial. You also take the chance of them developing testicular cancer.

Once a URI is ruled out by the vet, you need to ask yourself if the cat is declawed. If he/she IS declawed, that is a behavioral problem that stems from the declawing. It could be the cat is sensitive to the kind of litter you have in the box, or it could be that the box is not clean enough. Some cats refuse to use the box if it's not clean.

Once all THOSE issues are resolved, THEN you can go about doing what you suggested. Until you do the first three things I suggested, trying to train your cat will be a total waste of time, and will annoy the cat.