<P> Transfiguration, Defence Against the Dark Arts, Charms, Potions, Astronomy, History of Magic, and Herbology are compulsory subjects for the first five years, as well as flying lessons . At the end of their second year, students are required to add at least two optional subjects to their syllabus for the start of the third year . The five choices are Arithmancy, Muggle Studies, Divination, Study of Ancient Runes and Care of Magical Creatures . Very specialised subjects such as Alchemy are sometimes offered in the final two years, if there is sufficient demand . There is a total of twelve named Professors at Hogwarts, each specializing in one of these subjects . </P> <P> Transfiguration is essentially the art of changing the properties of an object . Transfiguration is a theory - based subject, including topics such as "Switching Spells" (altering only a part of some object, such as when Hagrid gave Dudley a pig tail); Vanishing Spells (causing an object to completely disappear); and Conjuring Spells (creating objects out of thin air). It is possible to change inanimate objects into animate ones and vice versa--Minerva McGonagall, the class's teacher, transfigures her desk into a pig and back in Philosopher's Stone . </P> <P> Defence Against the Dark Arts, commonly shortened to D.A.D.A., is the class that teaches students defensive techniques to defend against the Dark Arts, and to be protected from Dark creatures . In Harry Potter and the Deathly Hallows, with Death - Eaters in charge of the school, the subject is renamed the Dark Arts, and involves pupils practicing the Cruciatus Curse on those who have earned detentions . The subject has an extraordinarily high turnover of staff members--throughout the series no Defence Against the Dark Arts teacher has retained the post for more than one school year . Harry is exceptionally skilled in this subject . During the period the story takes place, the class is taught by Quirinus Quirrell (book one), Gilderoy Lockhart (book two), Remus Lupin (book three), Bartemius Crouch Jr impersonating Alastor "Mad - eye" Moody (book four), Dolores Umbridge (book five), Severus Snape (book six), and Amycus Carrow (book seven). Hagrid suggests in Harry Potter and the Chamber of Secrets that "They're startin' ter think the job's jinxed . No one's lasted long for a while now ." In Half - Blood Prince, Dumbledore suggests that Voldemort cursed the position because his application for it was rejected . The existence of the jinx was eventually confirmed by Rowling . The position had also been coveted by Snape, but he was denied the position as well . Snape was finally appointed D.A.D.A. professor in Half - Blood Prince . Rowling announced in an interview that once Voldemort had died, the jinx he placed on the office was lifted and a permanent professor had been teaching the subject between the end of Deathly Hallows and the epilogue, set nineteen years afterwards . Furthermore, she imagines that Harry Potter occasionally comes to the class to give lectures on the subject . </P> <P> Charms is the class that teaches how to develop incantations for the uses of bewitchment . Rowling has described Charms as a type of magic spell concerned with giving an object new and unexpected properties . Charms classes are described as notoriously noisy and chaotic, as the lessons are largely practical . Many of the exposition sequences in the books are set in Charms classes, which are on the second floor of Hogwarts . The class is taught by Filius Flitwick . </P>

Who taught defence against the dark arts in book number 5