code from c++ programming class at fvtc