Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need it quick please in C++ That is all it included in the question. Noting that main() calls insertData() in the following context: if(

image text in transcribedimage text in transcribed

I need it quick please in C++

That is all it included in the question.

Noting that main() calls insertData() in the following context: if( user Input == 'a' || user Input == 'A' ) { // Do A things for(int i = 0; i ; // so long as we aren't standing on the last car in the train... // Engage the traversal loop while( currDataPtr->nextDatapoint != ) { // Corner case: Check to see if this is repeat data... // if( (the timestamp to insert) matches (the current timestamp) ) if( == ) { // Do nothing (drop the attempt to insert data) return; // Note: Technically, we should delete the data that's being inserted // to avoid a memory leak, but that's not really the focus in this problem } // In event that an appropriate insertion location is found // else if( (the timestamp to insert) is less than the next timestamp) ) else if( ) { // ! // Stop traversing (break out of the traversal loop) break; } // In the event this is not a repeat, nor the spot to insert... else { // Advance along the linked list 1/ (The current position) gets (The current position's next train car) Task 3: Call 'A' and 'T' Add some nodes using 'A', then use 'T' to test the linked list and validate your results. Paste your (hopefully in-order) results below: Task 4: Modify the 'Add' behavior It seems like we'll have to make a very large number of calls to 'A' (add) in order to get meaningful data. Modify the program behavior such that a single 'A' request pulls in 100 datapoints at a time. Paste the line responsible for this change in program behavior below: Task 5: Run the program! By whatever means you choose, ascertain the shape of the datapoints and paste a screenshot of your results below: Noting that main() calls insertData() in the following context: if( user Input == 'a' || user Input == 'A' ) { // Do A things for(int i = 0; i ; // so long as we aren't standing on the last car in the train... // Engage the traversal loop while( currDataPtr->nextDatapoint != ) { // Corner case: Check to see if this is repeat data... // if( (the timestamp to insert) matches (the current timestamp) ) if( == ) { // Do nothing (drop the attempt to insert data) return; // Note: Technically, we should delete the data that's being inserted // to avoid a memory leak, but that's not really the focus in this problem } // In event that an appropriate insertion location is found // else if( (the timestamp to insert) is less than the next timestamp) ) else if( ) { // ! // Stop traversing (break out of the traversal loop) break; } // In the event this is not a repeat, nor the spot to insert... else { // Advance along the linked list 1/ (The current position) gets (The current position's next train car) Task 3: Call 'A' and 'T' Add some nodes using 'A', then use 'T' to test the linked list and validate your results. Paste your (hopefully in-order) results below: Task 4: Modify the 'Add' behavior It seems like we'll have to make a very large number of calls to 'A' (add) in order to get meaningful data. Modify the program behavior such that a single 'A' request pulls in 100 datapoints at a time. Paste the line responsible for this change in program behavior below: Task 5: Run the program! By whatever means you choose, ascertain the shape of the datapoints and paste a screenshot of your results below

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

Step: 3

blur-text-image

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago