Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


//IDEA SOLUTIO N OF CS304 3
#include<iostream.h>
class property_cat
{
      private:
              char society[20];
              int area;
      public:
             property_cat()
             {
                           area=0;
             }
             ~property_cat()
             {
             }
             char setsociety(char c[])
             {
                  strcpy(society,c);
             }
             char* getsociety()
             {
                   return society;
             }
             int setarea(int a)
             {
                 area=a;
             }
             int getarea()
             {
                 return area;
             }
                      
};
class Plot:public property_cat
{
      private:
              int plot;
      public:
             Plot()
             {
             }
             ~Plot()
             {
             }
             int setplot(int a)
             {
                 plot=a;
             }
             int getplot()
             {
                 return plot;
             }
             int iscorner()
             {
             }
             int isalloted()
             {
             }
             int isdeveloped()
             {
             }
};
class House:public property_cat
{
      private:
              int house;
              Plot *a;
      public:
             House()
             {
                    house=0;
             }
             ~House()
             {
             }
             int sethouse(int a)
             {
                 house=a;
             }
             int gethouse()
             {
                 return house;
             }
             int isoccupied()
             {
             }
};
class Flat:public property_cat
{
      private:
              int flat;
              Plot *a;
      public:
             Flat()
             {
                   flat=0;
                   
             }
             ~Flat()
             {
                   
             }
             int setflat(int a)
             {
                 flat=a;
             }
             int getflat()
             {
                 return flat;
             }
             int isoccupied()
             {
             }
};

main()
{
      cout"*****this assignment need no output*****\n";
      system("pause");
}

Views: 1722

Replies to This Discussion

output yeah aa rhe hea........................................................

Attachments:

complete 100% correct solution

Attachments:

Ash sis apne override ka concept kahan use kia ha???

YAY LO CS304 KI ASSIG 3 KAH SOLUTION

Attachments:

zindaBad zoraiz baba sab,,, ye bata dein iss mein mumkna chaning kahn ho skti hain

there are two solutions, one from ash and one from zoraiz, which one is correct? ek mein outputs aa rahi hain ek mein output kuch nahi aa rahi

konsa solution thek hai?

thank you very much

#include<iostream.h>

class PropertyCategories // .............. Base Class
{
private:
char Area[50];
char SocietyName[50];

public :
PropertyCategories()
{
cout"Base Class\n";
}
~PropertyCategories(){}

void setArea(char a[50])
{
Area[50]=a[50];
}

void setSocietyName(char s[50])
{
SocietyName[50]=s[50];
}

char getArea()
{
return Area[50];
}

char getSocietyName()
{
return SocietyName[50];
}

};
class Plot:public PropertyCategories // .............. Drive (plot)
{
private:
int plotno;
public :
Plot(){}
~Plot(){}

bool isPlotAllocated()
{}
bool isComerPlot()
{}
bool isDeveloped()
{}

};
class Flat: public PropertyCategories //// .............. Drive (Falt)
{
private:
Plot *plot;
int flatno;
public :
Flat()
{

}

~Flat()
{
delete plot;
}

bool isOccuiped()
{}

};
class House :public PropertyCategories // .............. Drive (House)
{
private:

Plot *plot;
int houseno;

public :
House()
{ }
~House()
{
delete plot;
}

bool isOccuiped()
{}
};


main()
{
system("pause");
}

thanks sahuna tariq bhai wala 1st solution tk hy srif cout k yeh hy

Asif please tell me output mein kuch visible hoga ya nahi I mean do solutions hain yaha konsa wala thek hai jis mein output aa rahi hai woh wala ya jis mein kuch nahi aa raha woh wala

yar is ki koi out put nahi hay bahi .....

Thank you Arsalan bhai

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service