Question:
Consider the following class HeadQuarter
class HeadQuarter
{
int Code;
char Des[20];
protected:
char Address[40];
public:
void Get() {cin>>Code;gets(Des);gets(Address);}
void Put() {cout<<Code<<Des<<Address<<endl;}
};
Write a code in C++ to protectedly derive another class FrontOffice From the base class HeadQuarter with following members.
Data Members
Location of type character of size 10
Budget of type double
Member Functions
A constructor function to assign budget as 100000
Assign() to allow user to enter Location and Budget
Display() to display Location and Budget
C. Sir| Created: 8-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019
