The mayor and council may prescribe by ordinance or resolution any and all public work to be performed in the city and the method of doing the same, and shall have charge of the performance of all such public work.