Esempio n. 1
0
 double Sale::savings(const Sale& other) const
 {
   return (bill() - other.bill());
 }
Esempio n. 2
0
 bool operator <(const Sale& first, const Sale& second)
 {
   // Because of polymorphism, will correctly apply subclass method
   // bill() instead of superclass method if subclass method implemented.
   return (first.bill() < second.bill());
 }
Esempio n. 3
0
bool operator <(const Sale& first, const Sale& second) {
	return (first.bill() < second.bill());
}