(Solved):Using C++ to write a program with class Owner and Class Shop1, Shop2, Shop3 in separate files. Owner: private double sales, double expense, constructor to initialize sales and expense, set and ge… View Answer…

 

Question

Using C++ to write a program with class Owner and Class Shop1, Shop2, Shop3 in separate files.

Owner: private double sales, double expense,

constructor to initialize sales and expense, set and get function for 2 variables.

Shop1, Shop2, Shop3: inherit from Owner class, has private double rate variable.

Constructor and also double profit function; set and get functions for rate (profit=(sales-expense)*rate).

In main: Create objects s1, s2, s3 for class Shop1, Shop2, Shop3, display the

Scroll to top