Rock, Paper, Scissors

Write a program that pits the human user against the computer in a game of "Rock, Paper, Scissors" as in the output below.

Computer and user each choose one: R for Rock, P for Paper, S for Scissor.

Each round, your program declares one the winner (ask user to enter his/her name; give the computer a name)

At end of game, winner is the one with the most wins.

Decisions to make:

How do you know when the game ends?

How to randomize computer's choice - R, P, S?