Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need an explanation of what this sample code is doing for this class i am suppose to implement? Sample P3main.cpp : using namespace std;

I need an explanation of what this sample code is doing for this class i am suppose to implement?

Sample P3main.cpp : using namespace std; #include #include "zDepthList.cpp" int main() { int l[30]; for (int i=0;i<30;i++) l[i]=i; zDepthList z(l,30); z.out('f'); z.move(10,2,'f'); z.out(); z.move(14,3,'r'); z.out('r'); z.movefront(4); z.moveback(13); z.out(); cout << endl << endl; for (int i=0;i<30;i+=2) l[i]=28-i; zDepthList x(l,30); x.out('f'); x.move(27,2,'f'); x.out(); x.move(3,8,'r'); x.out('r'); x.movefront(4); x.moveback(13); x.out(); x.addfront(); x.addback(); x.out(); #define bigsize 1000000 int big[bigsize]; for (int i=0;i zDepthList y(big,bigsize); for (int i=0;i for (int i=0;i for (int i=1;i for (int i=0;i cout << y.at(6) << " " << y.at(bigsize-2) << endl; }

Here is the output:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 0 1 2 3 4 5 6 7 8 9 11 12 10 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 13 10 12 14 11 9 8 7 6 5 4 3 2 1 0 4 0 1 2 3 5 6 7 8 9 11 14 12 10 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 13

28 1 26 3 24 5 22 7 20 9 18 11 16 13 14 15 12 17 10 19 8 21 6 23 4 25 2 27 0 29 28 1 26 3 24 5 22 7 20 9 18 11 16 13 14 15 12 17 10 19 8 21 6 23 4 25 2 0 29 27 27 29 0 2 25 4 23 6 21 8 19 10 17 12 15 14 13 16 11 18 9 20 7 22 5 24 26 1 28 3 4 3 28 1 26 24 5 22 7 20 9 18 11 16 14 15 12 17 10 19 8 21 6 23 25 2 0 29 27 13 30 4 3 28 1 26 24 5 22 7 20 9 18 11 16 14 15 12 17 10 19 8 21 6 23 25 2 0 29 27 13 31

999978 999994

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

9. Mohawk Industries Inc.

Answered: 1 week ago

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago