Write a program in C++ to reach a conclusion as to whether or

Added on - 16 Sep 2019

  • 2

    pages

  • 485

    words

  • 122

    views

  • 0

    downloads

Showing pages 1 to 1 of 2 pages
Write a program in C++ to reach a conclusion as to whether or not thedeleteNodeoperationfound in the Numberlist class (Program 17.4–Gaddis) is faster than theeraseoperation found intheStandard Template Librarylist header file. To come to an accurate conclusion, you need tomake sure that both linked list data structures are made up of the exact same data.1. Clearly state the problem that you are trying to solve.2. Hypothesis – What do you believe is the answer?3. Experiment – Describe how your program tests your hypothesis?4. Results – What results did your experiment yield?5. Conclusion – Was your hypothesis correct or incorrect? Explain why or why not.STL List References –http://www.cplusplus.com/reference/list/list/erase/https://msdn.microsoft.com/en-us/library/1fef72t6.aspxNumberlist class (Program 17.4--Gaddis)// This program demonstrates the deleteNode member function.2 #include <iostream>3 #include "NumberList.h"4 using namespace std;56 int main()7 {8 // Define a NumberList object.9 NumberList list;1011 // Build the list with some values.12 list.appendNode(2.5);13 list.appendNode(7.9);14 list.appendNode(12.6);1516 // Display the list.17 cout << "Here are the initial values:\n";18 list.displayList();
desklib-logo
You’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document