class Invoice { public: explicit Invoice(int subtotal) : subtotal_(subtotal), tax_(subtotal_ / 10) {} int total() const { return subtotal_ + tax_; } private: int tax_; int subtotal_; };