Menu

[Solved]Please Explain Words Advantage Object Oriented Programming B Dynamic Programming 2 Please Q37282293

i need the answer for q 3 and also attaching handout withthat
a. Please explain in your own words what is the advantage of Object Oriented Programming. b. What is Dynamic Programming? 2.# include< iostream> # include<vector> using namespace std; typedef vector char> row typedef vector<row> matrix; void printlcconst int number of rows-Y.size0: const int number of columns-X.size0: cout<<X.size0Ysize0<Cendl; matrix B; //cout<B now haselse clij C[ii-1]; cout<Here is your longest subsequence<<endl; printlcs(B, X, number of rows-1, number_of columns-D: cout<if (Bliil L) printlcs(B.X,ij-l);a. Please explain in your own words what is the advantage of Object Oriented Programming. b. What is Dynamic Programming? 2. Please illustrate simple inheritance in C++ (grand parent, parent, child classes). You can make up your own example or reformulate an example from a handout (rename the classes, change member functions) 3. Please submit working LCS code based on the Handout. 4.Please provide an information how LCS algorithm works with a matrix with numbers and arrows (as we did in the class). Your own example should provide two strings that have more than one LCS Explain which LCS can be found by the algorithm in question and how would you modify the algorithm so that all LCSs can be discovered.This is not a coding question. You need to provide informal explanations and a picture of your matrix. 5. Please provide your own example of all steps of Dijkstra Algorithm execution. Explain how you find the shortest path. Please provide a code or a pseudocode with the function printing the shortest path. 6. Please give an example of a C++ code with dynamic and static objects. Please put “cout statements” in the definitions of constructors and destructors. Explain the output. 7. Please provide a C++code that has only one line in mainO with an object creation, which produces 4 lines of the output. 8. Please provide an example or use the Handout example to explain the role of virtual function in C++ 9. Please explain the concept of Multiple Inheritance in C++ # include< iostream> # include<vector> using namespace std; typedef vector char> row typedef vector<row> matrix; void printlcs(matrix B, vector<char> X, int i, int j); //we view matrix as an array of rows int mainO vector char> X(1,0); vector<char> Y(1,0); char next cout<<“enter your first sequence. Type # when you are done” <<endl do cin>>next if(next!:-‘#’) X.push back(next): /while( next! ‘); cout<<“enter your second sequence. Type # when you are done”<<endl: 0 cin>>next if(next! ) Ypush back(next); /while(next=’#’); const int number of rows-Y.size0: const int number of columns-X.size0: cout<<X.size0Ysize0<Cendl; matrix B; //cout<“B now has a size “<B.size0<endl; B.resize(number of rows); for int j 0; j number of rows:jt+) 昕].resize( number-of-columns); matrix C C.resize(number of rows); forG 0:j<number_of rows; j++) C].resize(number of columns); forj 0 j< number of columns; j++) for(j-0; j< number of BUIIoj-0 for(int i-l; inumber of rows; i+) for(int j= l ; J< number-of columns; j++) else clij C[ii-1]; cout<“Here is your longest subsequence”<<endl; printlcs(B, X, number of rows-1, number_of columns-D: cout<<endl; return 0; void printlcs(matrix B, vector char> X, int i, int j) return; if(B[il D) printlcs(B.X,?,?); printles(B,X,i-1j); if (Bliil L) printlcs(B.X,ij-l); Show transcribed image text a. Please explain in your own words what is the advantage of Object Oriented Programming. b. What is Dynamic Programming? 2. Please illustrate simple inheritance in C++ (grand parent, parent, child classes). You can make up your own example or reformulate an example from a handout (rename the classes, change member functions) 3. Please submit working LCS code based on the Handout. 4.Please provide an information how LCS algorithm works with a matrix with numbers and arrows (as we did in the class). Your own example should provide two strings that have more than one LCS Explain which LCS can be found by the algorithm in question and how would you modify the algorithm so that all LCSs can be discovered.This is not a coding question. You need to provide informal explanations and a picture of your matrix. 5. Please provide your own example of all steps of Dijkstra Algorithm execution. Explain how you find the shortest path. Please provide a code or a pseudocode with the function printing the shortest path. 6. Please give an example of a C++ code with dynamic and static objects. Please put “cout statements” in the definitions of constructors and destructors. Explain the output. 7. Please provide a C++code that has only one line in mainO with an object creation, which produces 4 lines of the output. 8. Please provide an example or use the Handout example to explain the role of virtual function in C++ 9. Please explain the concept of Multiple Inheritance in C++
# include # include using namespace std; typedef vector char> row typedef vector matrix; void printlcs(matrix B, vector X, int i, int j); //we view matrix as an array of rows int mainO vector char> X(1,0); vector Y(1,0); char next cout

Expert Answer


Answer to a. Please explain in your own words what is the advantage of Object Oriented Programming. b. What is Dynamic Programming… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *