The purpose of the writ of Quo-Warranto is to prevent usurpation of a public office by an illegal appointment.