Give definition of two classes, Customer and Seller, whose objects are records for a Sale. Customer and seller will be derived from the Person class with member variable for Person’s name. A customer record has the customer’s name (inherited from the class Person) while a Seller object has a Seller’s name inherited from the class Person and seller id. A sale object will contain Customer and Seller objects, amount paid for the sale and cumulative sales amount from a time the object was created. Be sure your classes have a reasonable complement of constructors, accessor, and mutator member functions, and includes an overloaded equality operator. Write a test program that creates at least two Customers, at least two Sellers and at least two Sales, then prints sale summary and gross income from Sale records.
Jump to Post
"if some body been given a question and has no idea he cant be help"
We help people who show effort. You have been given a detailed step-by-step set of instructions for what to do, but you haven't even tried to follow them. Just start writing code and stop wasting …
All 4 Replies
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.