(a) The mayor, with the advice and consent of the city council, shall appoint a city attorney, together with such assistant city attorneys as may be authorized, and shall provide for the payment of such attorney or attorneys for services rendered to the city. The city attorney shall be responsible for providing for the representation and defense of the city in all litigation in which the city is a party; may be the prosecuting officer in the municipal court; shall attend the meetings of the council as directed; shall advise the city council, mayor, and other officers and employees of the city concerning legal aspects of the city's affairs; and shall perform such other duties as may be required by virtue of the person's position as city attorney. (b) The city attorney is not a public official of the city and does not take an oath of office. The city attorney shall at all times be an independent contractor. A law firm, rather than an individual, may be designated as the city attorney. (c) To maintain independence of judgment and to promote the integrity of the law, the city attorney shall serve a four-year term contiguous with the term of office of the mayor and shall not be removed during the term of office except for cause and by a vote of four councilmembers.