Create naivebayes.cpp

Implements the naivebayes.h.