formatted record.h and record.cpp