In Java Only. User-Defined Methods. This very hard for me, please help me and leaves notes so I can really understand what's going on with the code and pull out a math book, and thank you! The Power Station Problem: A power station os on one side of a river that is pne-half miles wide, and a factory is 8 miles downstream on the other side of the river. It costs $7 per foot to run the power lines overland and $9 per foot to run them underwater. Your objective is to determine the most economical path to lay the power line. That is, determine how long the power line should run underwater and how long it should run overland, to achieve the minimum total cost of laying the power line. Write a Java program that prompts the user to enter the following: a. The width of the river b. The distance of the factory downstream on the other side of the river. c. The cost of laying the power line underwater. D. The cost of laing the power line overland. The program then outputs the length of the powerline that should run underwater and the length that should run overland, so dthe cost of constructing the power line is at the minimum. The program should also putput the total cost of constructing the powerline
In Java Only. User-Defined Methods. This very hard for me, please help me and leaves notes so I can really understand what's going on with the code and pull out a math book, and thank you!
The Power Station Problem: A power station os on one side of a river that is pne-half miles wide, and a factory is 8 miles downstream on the other side of the river. It costs $7 per foot to run the power lines overland and $9 per foot to run them underwater. Your objective is to determine the most economical path to lay the power line. That is, determine how long the power line should run underwater and how long it should run overland, to achieve the minimum total cost of laying the power line.
Write a Java
a. The width of the river b. The distance of the factory downstream on the other side of the river. c. The cost of laying the power line underwater. D. The cost of laing the power line overland.
The program then outputs the length of the powerline that should run underwater and the length that should run overland, so dthe cost of constructing the power line is at the minimum. The program should also putput the total cost of constructing the powerline.
Step by step
Solved in 2 steps with 1 images