www.vustudents.ning.com

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

# CS304 Assignment No 03 Spring 2019 Solution & Discussion

CS304 Assignment No 03 Spring 2019 Solution & Discussion

Views: 1444

### Replies to This Discussion

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.

“How to Join Subject Study Groups & Get Helping Material”

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Share below link with friends for solution & Discussion. A Single link for help in your education.

http://bit.ly/vucodes

Site Overview | Assignment Solutions | Past Papers |Site Features

cs304 ki assignment no 3 ka solution upload kar dein sir

CS304 Assignment 03 Spring 2019 Solution.cpp

CS304 Assignment 03 Spring 2019 Solution.cpp

*****************

Although If you want to share the youtube video, then paste the embed codes here of the youtube video. Otherwise your comment / reply will be deleted. As well as your account will be deleted from the site. Thanks for understanding.

CS304 Assignment No 03 Solution Spring 2019

CS304 Assignment No 03 Solution Spring 2019

#include<iostream>
#include<cstring>
#include<cstdlib>

using namespace std;
class TaxPayer
{
char *Name, *filer;
double property_Value;
public:
~TaxPayer()
{
delete []Name;
delete []filer;
}
TaxPayer(char *Name, double property_Value, char *filer)
{
int length = strlen(Name);

this->Name = new char[length+1];
strcpy(this->Name, Name);

length = strlen(filer);
this->filer = new char[length+1];
strcpy(this->filer, filer);

this->property_Value = property_Value;
}
double GetPropertyValue()
{ return property_Value; }
{
double incomeTax=0.0;
if(strcmp(filer, "Filer")==0)
incomeTax = property_Value * 0.02;
else
incomeTax = property_Value * 0.04;

return incomeTax;
}
virtual void TaxPayerInfo()
{
cout"Tax Payer Name: "Nameendl;
cout"Property Value: "property_Valueendl;
}
virtual void Calculate_Total_Tax()=0;
};
class Seller:public TaxPayer
{
double CapitalGainTax, Property_Purchase_Price, profit, TotalTax;
int soldyear;
public:
Seller(char *Name, double property_Value, double Property_Purchase_Price, char *filer, int soldyear):TaxPayer(Name, property_Value, filer)
{
this->Property_Purchase_Price = Property_Purchase_Price;
this->soldyear = soldyear;
}
double Calculate_CGT()
{
if(soldyear <=3 && soldyear>0)
{
profit=GetPropertyValue() - Property_Purchase_Price;
switch(soldyear)
{
case 1:
{
CapitalGainTax=profit * 0.10;
break;
}
case 2:
{
CapitalGainTax=profit * 0.075;
break;
}
default:
{
CapitalGainTax=profit * 0.05;
break;
}
}
return CapitalGainTax;
}
}
virtual void Calculate_Total_Tax()
{
cout"Seller Tax"endl"----------"endlendl;
TaxPayerInfo();
cout"Sold Year: "soldyearendl;
cout"Capital Gain Tax: "CapitalGainTaxendl;
cout"Total Tax of Seller: "TotalTaxendl;
}
};
class Purchaser:public TaxPayer
{
double CapitalValueTax, Stamp_duty, TotalTax;
public:
Purchaser(char *Name, double property_Value, char *filer):TaxPayer(Name, property_Value, filer)
{}
virtual void Calculate_Total_Tax()
{
double value=GetPropertyValue();

CapitalValueTax=value * 0.03;
Stamp_duty=value *0.02;
cout"\nPurchaser Tax"endl"-------------"endlendl;
TaxPayerInfo();
cout"Capital Value Tax: "CapitalValueTaxendl;
cout"Stamp Duty: "Stamp_dutyendl;
cout"Total Tax of Purchaser: "TotalTaxendl;
}
};

int main()
{
Seller seller((char*)"Kamran", 500000, 300000, (char*)"Filer", 2);
Purchaser purchaser((char*)"Bilal", 500000, (char*)"Non-Filer");
TaxPayer *obj[2];

obj[0]=&seller;
obj[1]=&purchaser;
for(int i=0; i<2; i++)
obj[i]->Calculate_Total_Tax();

system("pause");
}

1

2

3

4

5

## Latest Activity

51 minutes ago
7 hours ago
arham khan and Technical Guru joined Virtual University of Pakistan
7 hours ago
Muhammad Bilal liked иαвєєℓ αнмє∂'s discussion Kya hal hain ning awam?
18 hours ago
Technical Guru liked Sana Sunny ツ's discussion we need Chat box at ning
yesterday
Technical Guru updated their profile
yesterday
yesterday
monaliza and waseem are now friends
yesterday