Update p2.cpp

Added incomplete function implementations