The Government is interested to create a Directory for peoples of Bangladesh.
As
Bangladesh is a large country, the government has decided to create NationalDirectory
and LocalDirectory and Profession seperately. Here class Profession will inherit
information from class LocalDirectory, NationalDirectory and Directory. Your task is to
write a program in C++ using OOP concept for Government of Bangladesh. The
government has already mentioned member data and member functions for each class
with function’s return type. See the table below:
Class Member data (Protected) Member function/method (Public)
Directory string personName; string setPersonInfo(string pn, string db)
string dateOfBirth; {
//complete the method
}
void displayInfo()
{
//complete the method
}
NationalDirectory int personAge; int setPersonAge(int age)
string personCity; {
//complete the method
}
string setPersonCity(string city)
{
//complete the method
}
void displayNationalInfo()
{
//complete the method
}
LocalDirectory string personAddress; string setPersonAddress(string address)
string personTelNo; {
string personLocalArea; //complete the method
double zipCode; }
string setPersonTelNo(string telNo)
{
//complete the method
}
string setPersonLocalArea(string Larea)
{
//complete the method
}
double setPersonZipcode(double zc)
{
//complete the method
}
void displayLocalInfo()
{
//complete the method
}
Profession string string setPersonProfession(string prof)
personProfession; {
string personInstitution; //complete the method
string personGrade; }
double personSalary; string setPersonInstitution(string inst)
{
//complete the method
}
string setPersonGrade(string Pgrade)
{
//complete the method
}
double setPersonSalary(double s)
{
//complete the method
}
void DisplayProfession()
{
//complete the method
}
You are not allowed to use any constructor in the program.
You are not allowed to use any cin.
Once you finish the classes, start writing the main(). In the main(), create an object
named as person with the reference of Profession Class. Access each method mentioned
in the above table to generate the following output.
Good Luck!!!!!