You are required to give C++ implementation of following classes:
1. PropertyPortal
2. PropertyType
3. Commercial
4. Residential
Following is the description of all data member and member functions of respective classes:
Data members for PropertyPortal:
o NoOFUsers: This data member will be used to know the total number of users which visited this site/portal.
o Name: Property portal will have some name; you can name it as VU-Real-Estate.
o UAN: Property portal will have some universal access number such as 111-111-111.
Methods for PropertyPortal:
o Constructor(s) and destructor.
o Setter and getter function for NoOFUsers, Name, and UAN data members.
o getPropertyInfo() will take information about property type, property belongs to which city and all other details which are available in PropertyType class.
Data members for PropertyType:
o City: User will input city in which he/she want to search property details.
Methods for PropertyType:
o Constructor(s) and destructor for class.
o Setter and getter function for city data member.
o getPropertyType() will ensure whether property is a commercial property or it is a residential property. A property can’t be both at same time.
Data members for Commercial
o PropertyValue: Will show some fixed value for the commercial property.
Methods for Commercial
o Constructor(s) and destructor for class.
o Setter and getter function for PropertyValue data member.
o getPlot() will return a plot number.
Data members for Residential
o PropertyValue: Will show some fixed value for the Residential property.
Methods for Residential
o Constructor(s) and destructor for class.
o Setter and getter function for propertyValue data member.
o getPropertyCategory() This method will check for property category if it is a plot then it will return true else will print an appropriate message.
Important Points:
1. You also have to show the relationship (inheritance, association, aggregation, composition) between classes in proper C++ syntax with comments. No marks will be given for incorrect relationship.
2. Dynamically allocate memory where required.
3. Implement all member functions of each class. Make sure you use most appropriate return types and signatures for the function.
4. Implement constructors of all classes (Overload constructors if required also can use copy constructor if required).
main(void)
{
class PropertyPortal
{
private:
int NoOfUsers;
char *UAN;
char *Name;
public:
void setNoOfUser(int No); // setting the day
void setUAN(char Uan); // setting the month
void setName(char Name); // setting the year
int getNoOfUser(); // getting the value of day
int getUAN(); // getting the value of month
int getName(); // getting the value of year
int getPropertyInfo();
// Constructors of the class
PropertyPortal();
PropertyPortal (int, char);
PropertyPortal(int, char, char);
// Destructor of the class
~PropertyPortal ();
// hidden part of the class