|
-
Apr 13th, 2011, 05:00 AM
#1
Thread Starter
New Member
Need help with programme
HEres my problem :
Bob is a carpet layer. He needs a way to calculate how much carpet he needs to take with him to be able to cover the floor in a room. The carpet he has is supplied in rolls that are 5 metres wide and 30 metres long. Any excess width gets discarded. This means that rooms that are wider than 5 metres need several strips of carpet. The smallest space that Bob will carpet is 1m x 1m, the biggest 20m x 20m.
Example:
For example, a room is 11 metres wide and 15 metres long.
Each roll of carpet is 30 meters long by 5 metres wide when it is unrolled.
Any excess width is discarded. This room will therefore need 3 strips of carpet. Each strip will be 15 metres long. The first two strips will be the full 5 metres wide, but the final strip will have to be cut so that it is only 1 metre wide.
Bob’s Requirements:
Bob requires a program that will tell him how many metres of carpet he will need to cover a room, how many rolls that will be, and how much full width carpet he will have left on the last roll.
Bob charges for his carpet by the metre, so he only works in whole metre lengths (e.g. If Bob needed to use 1.6 metres of carpet, he would charge for 2). He presently has to draw diagrams to work all this out, but would like a computer program to work this out for him. Bob has limited IT knowledge and would like his program to be easy to use, so he needs a user manual to explain how to use the program
any help ?
-
Apr 13th, 2011, 07:06 AM
#2
Re: Need help with programme
Welcome to Forums, UultamatI! 
Is that a school assignment?
-
Apr 13th, 2011, 07:18 AM
#3
Re: Need help with programme
We can help. What have you done so far?
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Apr 13th, 2011, 09:23 AM
#4
Re: Need help with programme
 Originally Posted by UultamatI
Example:
For example, a room is 11 metres wide and 15 metres long.
Each roll of carpet is 30 meters long by 5 metres wide when it is unrolled.
Any excess width is discarded. This room will therefore need 3 strips of carpet. Each strip will be 15 metres long. The first two strips will be the full 5 metres wide, but the final strip will have to be cut so that it is only 1 metre wide.
Interesting exercise, is it an assignment related to Optimisation or just calculation?
If it's a plain Carpet, it would be more efficient (in terms of waste), to have 3 strips of 11 X 5 metres, you wouldn't end up with 15 metres of 4 metres width left on the roll. He'd use 33 metres with no waste as opposed to 45 metres with 15 X 4 metres 'wasted' on the roll. Of course,in terms of Bob's income he'd sell 45 metres in the latter case as opposed to 33 in the former.
-
Apr 13th, 2011, 03:36 PM
#5
Thread Starter
New Member
Re: Need help with programme
hey. yeah its a school assignment. im from new zealand. i missed quite alot of class due to other commitments and now im just plain stuck haha.
-
Apr 14th, 2011, 03:18 AM
#6
Re: Need help with programme
Best thing to do is to work out the logic with pen and paper first - if you can't do it manually then you're going to struggle trying to write code to do it.
I can only suggest you have a go and then post your code if/when you run into problms.
Obviously, as this is an assignment, we can't write it for you, but we can point you in the right direction when required.
-
Apr 14th, 2011, 07:51 AM
#7
Re: Need help with programme
Just to get you started you will need few textboxes (at least 2 for input and 2 for output), a command button, perhaps a listbox or combo with list of available carper sizes, prices, etc.
You would use textboxes to input room size; you will need to do simle math to caculate area; ,don't forget to round calculated carpet length to the next whole number.
Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|