CPP Primer classes and friend function exercises