Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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'

image text in transcribed

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 Enterprize) 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). c) 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions