Imagine all Codémon share some things (name, level, HP), but each type has something special. Water Codémon have a swim() method, Fire ones have burn(). Instead of rewriting everything, you can create a parent class and have children inherit from it.