Question: In JAVA ,You are implementing a program which determines which construction machinery to buy and load onto a companys ships. Each piece of machinery uses
In JAVA ,You are implementing a program which determines which construction machinery to buy and load onto a companys ships. Each piece of machinery uses a certain amount of volume and generates a certain amount of profit when sold at the destination port.
1. The program shall graphically prompt the user for a file.
2. The program shall read the selected file of which the first line will be an integer which represents the cargo volume of the ship.
3. The program shall then read each line in the rest of the file containing a string followed by 3 integers which indicates the item name, the volume of each item, the number of items available, and the price it can be sold for.
4. The program shall output the number of each item that should be purchased for the ship.
5. The program shall indicate after that the number of milliseconds the program spent calculating the answer.
6. The program shall implement 2 different forms of the algorithm: 1 recursive and 1 using dynamic programming.
7. The program shall have 2 sets of output, 1 for each implementation.
8. The program shall write the output to a file in the same directory as the input file.
Example Input:
30
Bulldozer 5 5 30
Crane 6 2 40
Steamroller 10 3 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
