Classical mechanincs starts from the laws of Newton. These few laws describe how objects interact with eachother by applying force. From these laws, classical mechanics is derived and the motion of objects can be derived.
Quantum mechanics starts from the Schrodinger equation. This equation gives the energy of particles and makes it posibble to derive the probability densities of particles and how they change over time. This is done by implementing the physical effects that are present around the materials.
Electromagnetism uses the interactions between fields to calculate the properties. These fields are used in an ad hoc approach, without understanding of where they come from. Because of this, electromagnetism is not an ab initio method.