Question: Create a class named Store that has two data fields; store number and revenue, a non-default constructor that initializes the data fields, and include an
Create a class named Store that has two data fields; store number and revenue, a non-default constructor that initializes the data fields, and include an overloaded + operator that returns the total revenue for two Store objects. Write a main() function in which you declare two Store objects, and display their total revenue (demonstrating your overloaded + operator) Bonus: [3 MARKS] (ANSWER AT THE BOTTOM OF YOUR SOURCE CODE (i.e after closing main())) What would be the reason for an error (if any), on the main() function you declared three Store objects, and attempted to display their total revenue (i.e. cout<< s1 + s2 + s3<
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
