Yes, if all you want is a high pitched sound, the piezo buzzer is ideal. They can be very small and loud and efficient,
How you program the cpu depends on what type you use. For this app, I would think microcontroller would be sufficient and they are very low cost, low power. Cell phones use a more sophisticated microprocessor, but that is because they do so much more than you need.
Microcontrollers are typically programmed by a programmer that connects to a PC via USB.
Bob
Thanks Bob! So how would the micro-controller fit into the block diagram above?