Create Stat.cpp

added 2 functions