I need to write a java program that to estimate the cost of painting a house, a painter needs to know the surface area of the exterior (assume the doors or windows have uniform size). I am a beginner at programming in java and have run into a lot of trouble trying to write the program).The input are the width,length, and height of the house, the number of windows and doors and their dimensions.
2 Replies  764 Views  Last Post: 27 March 2013  12:15 AM
#1
java assignment trying to find the surface area of the exterior
Posted 26 March 2013  11:31 PM
Replies To: java assignment trying to find the surface area of the exterior
#2
Re: java assignment trying to find the surface area of the exterior
Posted 26 March 2013  11:40 PM
#3
Re: java assignment trying to find the surface area of the exterior
Posted 27 March 2013  12:15 AM
Sorry, this is in 2D, but it's already drawn so I'm not turning back now:
//GET HOUSE SIZE //GET # OF WINDOWS AND DOORS //SUBSTITUTE INTO EQUATION surfaceArea = (houseWidth * houseHeight * 4); surfaceArea = (numberOfDoors * (doorWidth * doorHeight)); surfaceArea = (numberOfWindows * (windowWidth * windowHeight));
For a cube house with 4 walls.
This post has been edited by Gungnir: 27 March 2013  12:23 AM
Page 1 of 1
