Question: can someone help me with the sdm for this #include #include #define KITCHEN_TAX 26.00//kitchen tax #define BATH_TAX 37.50//bathroom tax #define OROOM_TAX 19.00//any other room tax

can someone help me with the sdm for this

#include #include #define KITCHEN_TAX 26.00//kitchen tax #define BATH_TAX 37.50//bathroom tax #define OROOM_TAX 19.00//any other room tax #define MINIMUM_TAX 8990.00// minimim tax #define LWALL_TAX 18.00// long wall tax #define LWALL 15//longwall #define LUX_TAX 1352.00 //luxury tax #define LUXROOM 200 //luxury room #define MAX_TAX 45500 //maximum tax

double kitchenTax(double height, double width) { double txAmount = 0.0; double area = height * width; txAmount = area * KITCHEN_TAX; if (area >= LUXROOM) txAmount += LUX_TAX; return txAmount; }

double oRoomTx(double height, double width) { double txAmount = 0.0; double area = height * width; txAmount = area * OROOM_TAX; if (height >= LWALL) txAmount += (height - LWALL) * LWALL_TAX; if (width >= LWALL) txAmount += (width - LWALL) * LWALL_TAX; if (area >= LUXROOM) txAmount += LUX_TAX; return txAmount; }

double bathTx(double height, double width) { double txAmount = 0.0; double area = height * width; txAmount += (height - LWALL) * LWALL_TAX; if (width >= LONGWALL) txAmount += (width - LWALL) * LWALL_TAX; if (area >= LUXROOM) txAmount += LUX_TAX; txAmount = area * BATH_TAX; if (height >= LWALL) return txAmount; }

using namespace std; int main() { double txAmount = 0.0; double totFt = 0; double height, width; cout << "Enter the height and width of kitchen separated by a space (feet): "; cin >> height >> width; totFt += height * width; txAmount += kitchenTx(height, width);

cout << "Enter the height and width of living room separated by a space (feet): "; cin >> height >> width; totFt += height * width; txAmount += oRoomTx(height, width);

cout << "Enter the height and width of bathroom separated by a space (feet): "; cin >> height >> width; totFt += height * width; txAmount += bathTax(height, width);

cout << "Enter the height and width of bedroom separated by a space (feet): "; cin >> height >> width; totFt += height * width; txAmount += oRoomTx(height, width);

cout << "Enter the height and width of office separated by a space (feet): "; cin >> height >> width; totFt += height * width; txAmount += oRoomTx(height, width);

if (txAmount > MAX_TAX) txAmount = MAX_TAX; cout << "Total square footage: " << totFt << endl; cout << "Total tax due: " << txAmount << endl;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!