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

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 15:10, breannaasmith1122
Two flowing streams of argon gas are adiabatically mixed to form a single flow/stream. one stream is 1.5 kg/s at 400 kpa and 200 c while the second stream is 2kg/s at 500 kpa and 100 ? . it is stated that the exit state of the mixed single flow of argon gas is 150 c and 300 kpa. assuming there is no work output or input during the mixing process, does this process violate either the first or the second law or both? explain and state all your assumptions.
Answers: 1
image
Engineering, 04.07.2019 18:10, qwertylol12345
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
image
Engineering, 04.07.2019 18:10, nandalabella06
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
image
Engineering, 04.07.2019 19:10, Destinationz
Asteam is contained in a rigid tank with a volume of 1 m3. initially, the pressure and temperature are 7 bar and 500 oc, respectively. the temperature drops due to cooling process. determine: (1) the temperature at which condensation begins in °c, (2) the fraction of the total mass that has condensed when the pressure decreased to 0.5 bar. (3) the volume in m3 occupied by saturated liquid at the final state?
Answers: 3
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 in other subjects:

Konu
Computers and Technology, 01.09.2021 01:00