subject
Engineering, 18.02.2020 00:00 exoticbunnylover123

Your task is to write a program that
(1) prompts the user for the number of work weeks available (an integer);
(2) prompts the user for the names of the input and output files (strings);
(3) reads the available projects from the input file;
(4) solves the corresponding knapsack problem, without repetition of items; and
(5) writes to the output file a summary of the results, including the expected profit and a list of the best projects for the company to undertake.

Here is a sample session with the program:
Enter the number of available employee work weeks: 10
Enter the name of input file: KnapsackData1.txt
Enter the name of output file: Output1.txt

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Heat is added to a piston-cylinder device filled with 2 kg of air to raise its temperature 400 c from an initial temperature of t1 27 cand pressure of pi 1 mpa. the process is isobaric process. find a)-the final pressure p2 b)-the heat transfer to the air.
Answers: 1
question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Carbon dioxide gas expands isotherm a turbine from 1 mpa, 500 k at 200 kpa. assuming the ideal gas model and neglecting the kinetic and potential energies, determine the change in entropy, heat transfer and work for each kilogram of co2.
Answers: 2
You know the right answer?
Your task is to write a program that
(1) prompts the user for the number of work weeks availa...
Questions
question
Mathematics, 02.08.2019 06:30
Questions on the website: 13722359