Detailed Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem#CPP#6985

Problem Statement - 02D-2019S-C2

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

Solution

Click to open popup