ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

C++ data structure class

Hi hch88, 

I need your help again. This time it's for a C++ data structure class. I've attached the assignment document. I would like this to be completed by 11:30PM PST on 10/5/2016. 

Please let me know if you're able to do it. 

Thanks!

 

Data Structures in C++ Assignment:Assignment 1.1 [40 points]Create a simple main() that solves the subset sum problem for any vector of ints. Here is an example of the set-up andoutput. You would Fll in the actual code that makes it happen.int main() {int TARGET = 180;vector<int> dataSet;vector<Sublist> choices;vector<Sublist>::iterator iter, iterBest;int k, j, numSets, max, masterSum;bool foundPerfect;dataSet.push_back(20);dataSet.push_back(12);dataSet.push_back(22);dataSet.push_back(15);dataSet.push_back(25);dataSet.push_back(19);dataSet.push_back(29);dataSet.push_back(18);dataSet.push_back(11);dataSet.push_back(13);dataSet.push_back(17);choices.clear();cout << "Target time: " << TARGET << endl;// code provided by studentiterBest->showSublist();return 0;}The local variables you see above are not required; they come from my solution. If you want to use di±erent localvariables, feel free.Your output style can be di±erent from mine, as long as it contains equivalent information and is easy to understand.However, show enough runs to prove your algorithm works, and show at least one run that does not meet target, exactly.Also, provide a special test to quickly dispose of the case in which the target is larger than the sum of all elements in themaster set. This way, any target that is too large will not have to sit through a long and painful algorithm. Demonstratethat this works by providing at least one run that seeks a target larger than the sum of all master set elements.²inally, you are not Fnding all solutions, just one representative solution. There may be other subsets that do the job, butour algorithm only Fnds the one. (If you want to show all the solutions, that's Fne.)A run for the above would look like this:Target time: 180Sublist -----------------------------sum: 179array[0] = 20,array[1] = 12,array[2] = 15,array[3] = 25,array[4] =19,array[5] = 29,array[6] = 18,array[8] = 11,array[9] = 13,array[10] = 17

Attachments:

Answers

(11)
Status NEW Posted 22 May 2017 03:05 AM My Price 9.00

-----------

Not Rated(0)