|
-
Aug 18th, 2011, 01:00 AM
#1
Thread Starter
New Member
[RESOLVED] Can anyone please write this program?
Can anyone tell me the Visual Studio 2008 code to run a simple program that will do the following:
A friend of mine is a carpet layer. He needs a way to calculate how much carpet he needs to carpet floors in various rooms.
The carpet he has is supplied in rolls that are 5 meters wide and 30 metres long. Any excess width is discarded. This means that rooms that are wider than 5 meters need several strips of carpet. The smallest space that he will carpet is 1m x1m, the biggest is 20m x 20m. At the moment , he has to draw diagrams to work out how much carpet he needs. I told him that I could get a computer program to work this out for him. So I need to make a program that will tell him:
1) How many metres of carpet he will need to cover a room.
2) How many rolls of carpet that will be.
3) How much full-width carpet he will have left on the last roll.
He charges for his carpet by the metre, so he only works in the whole metre lengths. In other words even if he only needed 1.6 meters of carpet for the room, he would charge the customer for 2 meters because he has to discard the unused part of the metre.
Must include: The program must be simple and something like a form that can be filled in. Keyboard input. Screen output. Looping. Iteration. Decisions/selection. Arithmetic and data validation.
Example:
Imagine that he has to carpet a room that is 11 meters wide and 15 meters long.Each roll of carpet is 5 meters wide by 30 metres long when it is unrolled.
Therefore, this room will need 3 strips of carpet. Each strip will be 15 metres long. The first two strips will be the fill 5 metres wide, but the final strip will have to be cut so that it is only 1 metre wide.
Your help is GREATLY appreciated
-
Aug 18th, 2011, 07:26 AM
#2
Re: Can anyone please write this program?
You might have better luck if you admitted that this was a class assignment and asked us for our help rather than trying to con us into thinking that you're doing this for a friend. Why on earth would your friend the carpet layer require you to include things like looping/iteration? Why would he care or even know that that's what programs contain? Maybe I'm wrong and, if so, I apologise, but I very much doubt it. If this is how you get your homework done then I'm afraid that you don't deserve to pass. Show us what effort you've made and tell us where you're stuck and you'll find lots of people eager to help. Try to trick us into doing your work for you and see how many friends you make.
-
Aug 18th, 2011, 08:59 AM
#3
Re: Can anyone please write this program?
Even worse is a carpet layer who happens to know in advance the largest size room he will ever carpet.
I should also point out that if this were a real problem, you are pretty much trying to solve a type of problem for which there is no perfect solution, so only non-linnear options would work to any extent. Fortunately for you, it isn't a real problem, and you are allowed to simplify it to make it tractable.
My usual boring signature: Nothing
 
-
Aug 18th, 2011, 09:21 AM
#4
Member
Re: Can anyone please write this program?
Think your friend have a got a floor plans which was drawn
in AutoCAD or ArchiCAD
If so you better go to www.theswamp.org and ask in there about
this task on .ARX or .NET section
-
Aug 18th, 2011, 09:34 AM
#5
Re: Can anyone please write this program?
 Originally Posted by jmcilhinney
You might have better luck if you admitted that this was a class assignment and asked us for our help rather than trying to con us into thinking that you're doing this for a friend.
I actually think it was just a copy/paste from the assignment, all the OP did was add a hello and thanks line. Defo class assignment.
-
Aug 18th, 2011, 10:01 AM
#6
Re: Can anyone please write this program?
 Originally Posted by Grimfort
I actually think it was just a copy/paste from the assignment, all the OP did was add a hello and thanks line. Defo class assignment.
Just about, but in the assignment (177K .Doc) it's "Bob is a carpet layer...", maybe the OP knows Bob personally!
-
Aug 18th, 2011, 11:03 AM
#7
Re: Can anyone please write this program?
 Originally Posted by Edgemeal
Just about, but in the assignment (177K .Doc) it's "Bob is a carpet layer...", maybe the OP knows Bob personally! 
Totally classic 
My usual boring signature: Nothing
 
-
Aug 18th, 2011, 11:07 AM
#8
Re: Can anyone please write this program?
Ever notice how school projects never actually equate to real world projects? You can spot them a mile away.
-
Aug 18th, 2011, 11:14 AM
#9
Hyperactive Member
Re: Can anyone please write this program?
Sure I'll write it. $100 to my paypal account. Everyone deserves to get paid for doing other peoples work.
-
Aug 18th, 2011, 02:43 PM
#10
Re: Can anyone please write this program?
I agree with Grunt. Plus he's thinking in real life senario's. I need someone to program this for me:
I have a friend that is a professor at the university I go to, DOU(Drop Out University). He needs a simple calculator that calculates how many of his students are going to join his class and vbforums.com to do his assignments for free. He will only have a max of 10 students in his class per period, but he buys students in 11x1 per period.
Must include: The program must be simple and something like a form that can be filled in. Keyboard input. Screen output. Looping. Iteration. Decisions/selection. Arithmetic and data validation
Example: If he has 3 periods, and 10 students in each one, he would need to kill 3 students.
Thanks y'all :]
-
Aug 18th, 2011, 03:52 PM
#11
Re: Can anyone please write this program?
 Originally Posted by Grunt
Sure I'll write it. $100 to my paypal account. Everyone deserves to get paid for doing other peoples work.
Boy, you work CHEAP!
-Max
The name's "Peck" .... "Max Peck"
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair
-
Aug 18th, 2011, 04:25 PM
#12
Re: Can anyone please write this program?
I was going to say that, too, but then I considered the problem a bit more. If it were anything other than a simplistic homework assignment, the problem is actually quite difficult. After all, figuring the minimal amount needed for any given room up to 20x20 for a real business would mean figuring out the minimum amount needed, and whether or not existing scraps could be used. Since the shape of real rooms is not necessarily rectangular, this becomes an NP-complete problem, for which no good solution exists, but some solutions can be 'pretty good'.
However, since this is an academic exercise, writing some kind of nonlinnear search program is certainly not what is intended. After all, the problem states that Bob will charge for the meter, and doesn't ask what happens to the unused portion (in fact, it suggests that he will throw away any partial roll, since he will throw away any partial meter scrap). Once you simplify it in that way, you can also assume that all rooms are rectangular in shape, which makes the problem so trivial that $100 isn't really that cheap.
Had I the time, I would have modified a genetic algorithm program I wrote that solves a similar NP-complete problem (it's in the codebank). Frankly, if the OP submitted that, they would deserve whatever they had coming to them. If they could explain what it did, then they would deserve a good grade. Otherwise....well, they would deserve whatever happened. Fortunately, I don't have the time.
My usual boring signature: Nothing
 
-
Aug 20th, 2011, 07:26 AM
#13
Junior Member
Re: [RESOLVED] Can anyone please write this program?
Looks like this is a popular question.
-
Aug 20th, 2011, 09:51 AM
#14
Re: [RESOLVED] Can anyone please write this program?
hahaha... looks like the same poster... nice.
-tg
-
Aug 21st, 2011, 02:10 AM
#15
Fanatic Member
Re: [RESOLVED] Can anyone please write this program?
Oh how I remember seeing posts like this on vWorker, and people paying "top dollar"(aka $5)...
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
|