calculate the cost of total materials

I think it's £6 per square metre.
I will do it like that and suppose that it is £6 per m^2, Normally for this to be right I would need the height of the rooms so I can calculate the volume of the rooms and then calculate how much materials I need?
 
I've edited my previous calculation post btw.

Your programme (assuming it is £6/m2) needs to have a width and length parameter for the rooms, a number of rooms parameter and a number of houses parameter and a price per m2 parameter. So you can vary all of those elements and it will spit out an answer.

Of course I could be way off! :ROFLMAO::ROFLMAO::ROFLMAO:
 
I've edited my previous calculation post btw.

Your programme (assuming it is £6/m2) needs to have a width and length parameter for the rooms, a number of rooms parameter and a number of houses parameter and a price per m2 parameter. So you can vary all of those elements and it will spit out an answer.

Of course I could be way off! :ROFLMAO::ROFLMAO::ROFLMAO:
:ROFLMAO::ROFLMAO:
I was thinking the same, but the problem I had is that it says £6/m. If we supposed that it is indeed £6 per meter, how would I go about this? I think that I would need the height or rooms, as well as wood sizes length and width of said wood?
 
Well firstly stop saying £6/m because that in itself doesn't mean one thing or the other, if the question said what each m was then the question would be much clearer. Can you not ask whoever set the question to clarify it? And tell them they're a berk.

If it was £6 per metre length then in theory you'd need to know the stud centres, height, noggins, openings and how the rooms were joined together as that too would have an effect on how much wood you needed.
 
Well firstly stop saying £6/m because that in itself doesn't mean one thing or the other, if the question said what each m was then the question would be much clearer. Can you not ask whoever set the question to clarify it? And tell them they're a berk.

If it was £6 per metre length then in theory you'd need to know the stud centres, height, noggins, openings and how the rooms were joined together as that too would have an effect on how much wood you needed.
Okay, thank you for all the help, I will leave the cost part at the end of the programme and try and ask the berk:ROFLMAO:, to clarify the problem.

Also if you could please clarify what you meant by "if the question said what each m was then the question would be much clearer", you meant if they said if it is m or m^2?
Thanks again, and have a great week
 
Well it says wood prices have been set at £6 per metre.

That could mean per meter square ie area,
or metre length of wood for the studs that make up the walls,
or perhaps its the total cost per metre length of wall?

The berk spelt metre wrong too in their question btw.
 
For a start I don't think the clueless computer geek who wrote the question has a clue what a stud wall is, they're not thinking that deeply about this... more Minecraft type understanding of the physical world around them.

The 2nd problem as other have pointed out, is that just stating "metre" is imbecilic, there are linear metres, square metres and cubic metres. Very very very important to define exactly which one you mean.

My assumption would be that they're referring to square meterage (m2), as it's the only thing which really makes sense. So they may be looking at it that we can calculate the cost of the house by measuring the floor plan and applying a budget m2 rate... some people actually do this for high level budgets I suppose.

So they basically are looking for a formula which calculates area "X" x "Y" for each instance of a house (they've simplified this by making all the houses exactly the same) and applies a m2 rate "R" to give total cost.

So X * Y * nr of houses * "R" = Cost?

If they intend you to work out the area of all surfaces i.e. floor, walls and ceiling, then you're going to need the room height ("Z"). You could pre-empt this for brownie points and create a variable for the room height and calculate total surface area.

(X * Y) * 2 = Floor/Ceiling area.
((X + Y) * 2) * Z = Wall Area

Add them together and apply material rate.

Does that makes sense?
 
There won't be a correct answer to this question, the question setter just wants you to show the logic behind the code.

My interpretation would be the total length of wood required to frame these rooms (to make a wireframe box). The dimensions are labelled as "i.e.", but I suspect they meant "e.g.", for you to make up some sensible numbers.

Cost = 6
N_houses = 5
N_rooms = 3
Length = 2
Width = 4
Height = 2

Perimeter = 2x(Width + Length)
Total_Length = (4xHeight + 2xPerimeter) x N_rooms x N_houses
Total_cost = Total_Length*Cost


Depending on what level of education this is based on, maybe you want to add more complexity e.g. remove the double counted wood between the two rooms, calculate number of studs based on wall lengths (length/0.6)*height, add noggins (perimeter x 3 rather than x 2), add joists (length/0.6)x width etc etc
 
For a start I don't think the clueless computer geek who wrote the question has a clue what a stud wall is, they're not thinking that deeply about this... more Minecraft type understanding of the physical world around them.

The 2nd problem as other have pointed out, is that just stating "metre" is imbecilic, there are linear metres, square metres and cubic metres. Very very very important to define exactly which one you mean.

My assumption would be that they're referring to square meterage (m2), as it's the only thing which really makes sense. So they may be looking at it that we can calculate the cost of the house by measuring the floor plan and applying a budget m2 rate... some people actually do this for high level budgets I suppose.

So they basically are looking for a formula which calculates area "X" x "Y" for each instance of a house (they've simplified this by making all the houses exactly the same) and applies a m2 rate "R" to give total cost.

So X * Y * nr of houses * "R" = Cost?

If they intend you to work out the area of all surfaces i.e. floor, walls and ceiling, then you're going to need the room height ("Z"). You could pre-empt this for brownie points and create a variable for the room height and calculate total surface area.

(X * Y) * 2 = Floor/Ceiling area.
((X + Y) * 2) * Z = Wall Area

Add them together and apply material rate.

Does that makes sense?
I got to this point, good that I came back here, that makes a lot of sense, I am still working this out, thanks for the detailed explanation
 
There won't be a correct answer to this question, the question setter just wants you to show the logic behind the code.

My interpretation would be the total length of wood required to frame these rooms (to make a wireframe box). The dimensions are labelled as "i.e.", but I suspect they meant "e.g.", for you to make up some sensible numbers.

Cost = 6
N_houses = 5
N_rooms = 3
Length = 2
Width = 4
Height = 2

Perimeter = 2x(Width + Length)
Total_Length = (4xHeight + 2xPerimeter) x N_rooms x N_houses
Total_cost = Total_Length*Cost


Depending on what level of education this is based on, maybe you want to add more complexity e.g. remove the double counted wood between the two rooms, calculate number of studs based on wall lengths (length/0.6)*height, add noggins (perimeter x 3 rather than x 2), add joists (length/0.6)x width etc etc

Thank you for the suggestion and the help offered
 
As the others have said, there is no 'answer' to this question. The point is to come up with a workable bit of code, that will give you a costing based on some suitable (and stated) assumptions.
To an extent, how far you go will depend on the marks available for the question! ;)

...if this was an end of term project, I would include calculations to remove an external and two internal doorways and 'n' amount of windows from the total. I would include calculations for the floor, and an apex roof! (But then I always did go to far! ;) ).

Other assumptions -
As the question states the house is made 'all from wood', I would assume a surface area measurement was required, rather than it being based on studs.
The example room measurement is 2 X 4; these can easily be variables that can be assigned at the start of the code, allowing a change of room size at any point.
The cost of wood is given at £6 / metre. This could be a mistake, or you could assign another variable for plank width! :)

Have fun!

....and as with many of these questions, if you wanted to Google the first line of the question, some interesting answers may appear! ;)

https://www.assignmentexpert.com/ho...computer-science/java-jsp-jsf/question-319828
 
As the others have said, there is no 'answer' to this question. The point is to come up with a workable bit of code, that will give you a costing based on some suitable (and stated) assumptions.
To an extent, how far you go will depend on the marks available for the question! ;)

...if this was an end of term project, I would include calculations to remove an external and two internal doorways and 'n' amount of windows from the total. I would include calculations for the floor, and an apex roof! (But then I always did go to far! ;) ).

Other assumptions -
As the question states the house is made 'all from wood', I would assume a surface area measurement was required, rather than it being based on studs.
The example room measurement is 2 X 4; these can easily be variables that can be assigned at the start of the code, allowing a change of room size at any point.
The cost of wood is given at £6 / metre. This could be a mistake, or you could assign another variable for plank width! :)

Have fun!

....and as with many of these questions, if you wanted to Google the first line of the question, some interesting answers may appear! ;)

https://www.assignmentexpert.com/ho...computer-science/java-jsp-jsf/question-319828
wow, well I will be damned, cheers what can I say, I had the same train of thought as you had, but given that this is an end of term project for year 1, I do not believe they want to complicate that much. Thank you again
 
As the others have said, there is no 'answer' to this question. The point is to come up with a workable bit of code, that will give you a costing based on some suitable (and stated) assumptions.
To an extent, how far you go will depend on the marks available for the question! ;)

...if this was an end of term project, I would include calculations to remove an external and two internal doorways and 'n' amount of windows from the total. I would include calculations for the floor, and an apex roof! (But then I always did go to far! ;) ).

Other assumptions -
As the question states the house is made 'all from wood', I would assume a surface area measurement was required, rather than it being based on studs.
The example room measurement is 2 X 4; these can easily be variables that can be assigned at the start of the code, allowing a change of room size at any point.
The cost of wood is given at £6 / metre. This could be a mistake, or you could assign another variable for plank width! :)

Have fun!

....and as with many of these questions, if you wanted to Google the first line of the question, some interesting answers may appear! ;)

https://www.assignmentexpert.com/ho...computer-science/java-jsp-jsf/question-319828
yes, I have checked it, but it is wrong, as we all know that rooms are not 2d but 3 dimensional so the code is incorrect. But thank you very much as I did not know about this resource:ROFLMAO::ROFLMAO:
 
As the others have said, there is no 'answer' to this question. The point is to come up with a workable bit of code, that will give you a costing based on some suitable (and stated) assumptions.
To an extent, how far you go will depend on the marks available for the question! ;)

...if this was an end of term project, I would include calculations to remove an external and two internal doorways and 'n' amount of windows from the total. I would include calculations for the floor, and an apex roof! (But then I always did go to far! ;) ).

Other assumptions -
As the question states the house is made 'all from wood', I would assume a surface area measurement was required, rather than it being based on studs.
The example room measurement is 2 X 4; these can easily be variables that can be assigned at the start of the code, allowing a change of room size at any point.
The cost of wood is given at £6 / metre. This could be a mistake, or you could assign another variable for plank width! :)

Have fun!

....and as with many of these questions, if you wanted to Google the first line of the question, some interesting answers may appear! ;)

https://www.assignmentexpert.com/ho...computer-science/java-jsp-jsf/question-319828
I am not sure, if I should add the width of the wood, I have thought about that.
This is the code I ended up writing, I am considering if I should add the width bit for the wood and make new calculations, but I am not sure if I should complicate it that much, as I am doing it for someone else and it is they first term of the 1st year and they usually do not go this 'deep'

int nrH = 5;
int nrR = 3;

double height = 2;
double length = 4;
double width = 2;
double price = 6;

System.out.println("Number of houses: " + nrH);
System.out.println("Number of rooms per house: " + nrR);

System.out.println();

System.out.println("As rooms have the exact same dimensions, it results that the width is equal to height");
System.out.println("Length of rooms: " + length + " meters");
System.out.println("Width of rooms: " + width + " meters");
System.out.println("Height of rooms: " + height + " meters");






System.out.println();

System.out.println("Price of wood is: " + "£" + price + " per meter");

System.out.println();

System.out.println("To calculate the area of a room we need to calculate the area of floor and ceiling and the area of walls");

double fcArea = length*width*2;
System.out.println("Area of floor and ceiling is: " + fcArea+ " m^2");

double wArea = ((length + width) * 2) * height;
System.out.println("Area of walls is: " + wArea+ " m^2");

double areaRoom = fcArea + wArea;
System.out.println("Area of one room is equal to: " + areaRoom + " m^2");

double totalAreaRoom = areaRoom * nrR * nrH;


System.out.println();
System.out.println("Total area of all rooms and houses is: " + totalAreaRoom + " m^2");

System.out.println();

System.out.println("As the data given for the price of wood is incorrect, we are unable to calculate the total cost of the contruction");
System.out.println("The price of wood should have been £6 per square meter, not £6 per meter");
System.out.println("If we assume that the price of wood was £6 per square meter the total build cost would be: " + "£" + totalAreaRoom*price);




I can not believe I am on a building forum for a programming problem :ROFLMAO::ROFLMAO::ROFLMAO:, but I had more results with everyone's help, so yeah, thanks to you all
 
Back
Top