Create a class Invoice
,
that has a string property vendor
and a double property amount
. Overload the addition operator
so that if the vendor
properties match, the amount
properties of the two invoices are added together in a new
invoice. If the vendor properties do not match, the new invoice is
blank.
Modify the Invoice
class
so that two invoices are considered equal if the vendor
and amount
properties match. Test your
methods.