Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**-------------------------------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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions