Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-25-2008, 10:49 PM
Member
 
Join Date: Mar 2008
Posts: 3
sthack99 is on a distinguished road
Power Station Problem
I need help on a homework assignment.

Let's say we have a power station on one side of a river and a factory on the other side of the river. For this example, we will say the river is half a mile wide, and the factory is 8 miles downstream from the power station. We'll also say it costs $9 to run power lines underwater, and $7 to run them overland. My objective is to determine the most economical path to lay the power line. That is, determine how long the power line should run under water and how long it should run over land, to achieve the minimum total cost of laying the power line.
THEN I need to create a program that will prompt the user to enter:
- the width of the river
- the distance of the factory downstream on the other side of the river
- the cost of laying the power line underwater
- the cost of laying the power line overland
The program should then output the length of the power line that should be run underwater, the length overland, and the total cost of constructing the power line.

I've been working my brain at this one all day and I just can't anymore. Can anyone help me?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power*MatchMaker 0.9.2 JavaBean Java Announcements 0 11-27-2007 10:21 PM
Power*MatchMaker 0.9.1 JavaBean Java Announcements 0 11-17-2007 04:05 PM
Power*Architect 0.9.7 levent Java Announcements 0 07-31-2007 08:52 PM
Power*Architect 0.9.6 JavaBean Java Announcements 0 07-07-2007 04:25 PM


All times are GMT +3. The time now is 04:58 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org