Question: 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

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.

The program shall implement 2 different forms of the algorithm: 1 recursive and 1 using dynamic programming

The program shall read the selected file of which the first line will be an integer which represents the cargo volume of the ship.

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

The program shall output the number of each item that should be purchased for the ship

The program shall indicate after that the number of milliseconds the program spent calculating the answer

The program shall have 2 sets of output, 1 for each implementation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!