Related questions
Write a java
a). Solve Knapsack
b). Print Solution, should print or graphically display the following:
- Number of items selected
- Total Value of the items selected
- List of the items or positions selected
c). The program should have a main/driver/test class that can do the following:
- Receive knapsack Max Weight, I.e., W
- Receive the number of selectable items
- Receives the weights for each item
- Receives the values for each item
d). Solves uses the knapsack class to solve and print/display the solution.
Requirement:
a) The program either an interface to input the required values or allow a user to point to a data file with the values in a specific format to read in.
b).Be sure that if a user use user input on a command line or in a GUI checks that values being provided are in range and valid. Additionally, user may want to put limits on values being passed in such as a max capacity or max item list, etc.
to generate a solution
a solution
- Text book imageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningText book imageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageText book imageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Text book imageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTText book imageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTText book imageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning