Question: Using c++ language a) Create a class called 'Enterprize', it has one private member variable called 'category' (of character type, its value is either 'F'

 Using c++ language a) Create a class called 'Enterprize', it has
Using c++ language

a) Create a class called 'Enterprize', it has one private member variable called 'category' (of character type, its value is either 'F' (for food), or 'C' (for clothing), or 'H' (for housing)). This class should have constructor and accessor functions. b) Create a derived class (of Enterprise) called 'not_for_profit' having one private member variable called 'sponsor' (of character type, its value is either 'P' (for private), or 'G' (for government)). This derived class should also have constructor and accessor functions. c) Create another derived class (of Enterprize) called 'for_profit' having one private member variable called "revenue" (of integer type). This derived class should also have constructor and accessor functions. d) Define all the functions (no need of default constructors). e) In the main function, declare one object (called Salvation_army) of class 'not_for_profit that has private sponsor and deals with clothing. Declare another object (called HEB) of class 'for_profit' that has SIM revenue and deals with food. f) Write statements to check if Salvation_army and HEB are in the same category of Enterprize or not (food, clothing, or housing) and print appropriate messages

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!