Answer to Question #217915 in C++ for mir

Question #217915

An Islamic bank wants you to develop a Zakat Calculator for them. The calculator shall take the input of the 1) name of zakat donor, 2) Bank_Balance, 3) zakat_amount. Create constructor to initialize variables with default values which will be called on the time of object instantiation. There should be a method named “Cal_zakat()” which calculates the zakat of each donor and set in zakat_amount. The program adds up the zakat of each donor hence calculating the total_zakat of the bank. Use a “display()” which displays not only the data of the donor but also the total amount of zakat of the bank. It should keep in mind that the zakat will be calculated only if Bank_Balance is greater than or equal to 20,000. (You should implement the concept of overloading, copy constructor or overriding wherever it is applicable) 


1
Expert's answer
2021-07-17T01:30:16-0400
#include <iostream>


using namespace std;


int main()
{
    float money, zakat, gold;
    cout<<"Enter the gold you have: ";
    cin >> gold;
    money = gold*71200;
    zakat = (money/100)*2.5;
    cout<<"Your payable zakat is "<<zakat;
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS