The aim of this book is to present the mathematical theory and the know-how to make computer programs for the numerical approximation of Optimal Control of PDE's. The computer programs are presented in a straightforward generic language. As a consequence they are well structured, clearly explained and can be translated easily into any high level programming language. Applications and corresponding numerical tests are also given and discussed. To our knowledge, this is the first book to put together mathematics and computer programs for Optimal Control in order to bridge the gap between mathematical abstract algorithms and concrete numerical ones. The text is addressed to students and graduates in Mathematics, Mechanics, Applied Mathematics, Numerical Software, Information Technology and Engineering. It can also be used for Master and Ph.D. programs.