Question
**-------------------------------Computer C# -----------------------------------** The Knapsack Planner Imagine you have to spend a year on a remote island, and need to plan which ofyour belongings to
**-------------------------------Computer C# -----------------------------------**
The Knapsack Planner
Imagine you have to spend a year on a remote island, and need to plan which ofyour belongings to take with you. You have got items with different names, weight(in kg), volume (in cubic centimetres), and value (in dollars and cents). The amountof baggage you can take is restricted to what you can fit in a small number of bags orother containers, each of which can hold only a limited weight and volume of items
QUESTION one:
Please create a form with three list boxes or data grid views or similar controls. The first ofthese (theunpackedlist) will display the items not in any container, the secondwill display thecontainers, and the third will display the items packed in one of the containers.Next please write C# code for the classes identified in exercise 1. Initialise lists that contain atleast the items and containers mentioned the fileknapsack.csvavailable in Moodle, and makesure that they immediately appear on your form when the program is started. Ensure that allattributes of your objects are displayed, and format them nicely.Hint.You may hard-code the data into your program, or read it from files. If using files,please make sure your program can be compiled and run from thesubmission archive. All filesneeded to run your program must be included in your archive, and accessed throughresourcesorrelativepath names.
** I have buiding up some code, but when I run it, items data didnt add to packed container(third data grid), I dont know where is the problem,stucked there
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started