123
const Stock & topval(const Stock & s) const; ... top = stock1.topval(stock2);
1234567
const Stock & Stock::topval(const Stock & s) const { if (s.total_val > total_val) return s; else return *this }