In order to estimate the cost of painting a house, a painter needs to know the surface area of the exterior. Develop an algorithm for computing that value. Your inputs are the width, length, and height of the house, the number of windows and doors, and their dimensions. (Assume the windows and doors have a uniform size.)

Assume there are four walls in the house

Initial the width of the house is X

Initial the length of the house is Y

Initial the height of the house is D

Initial the number of windows is NW

Initial the number of doors is ND

Initial the width of the window is WW

Initial the height of the window is HW

Initial the width of the door is WD

Initial the height of the door is HD

Initial the area of the surface is AS

Initial the cost of painting per unit is cost per unit

Initial the total painting cost is 0

The area of the surface = X * D * 2 + Y * D * 2 – ND * WW * HW – NW * WD * HD

The total painting cost = cost per unit * the area of the surface