Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using C++ Program Language Declare an array (using arrayListType.h) hold from 60

ID: 3553842 • Letter: U

Question

Using C++ Program Language



Declare an array (using arrayListType.h) hold from 60 to 70

integers.

Load the array with data from lab7.dat

Sort the array using the Selection sort (which is defined in

arrayListType.h) and counting the number of loop iterations and

the number of record moves.

Print the sorted array, the number of loop iterations and the

number of record moves.

Do the same thing with the Insertion and Quick sorts.

This program uses the data file lab7.dat. Create the output file,

xxxlab7.out, for all of your output.

Note, you must start with the original unsorted array each time.




/////////////////////////////////////////////////////////////////////arrayListType.h\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


//////////////////////////////////////////////////////////////////////////////////////////Lab7.dat\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


735

341

646

229

842

620

741

222

165

182

943

150

250

350

228

344

828

110

987

777

191

545

878

900

351

291

854

404

607

305

199

395

809

504

841

149

492

613

386

929

481

853

729

205

482

774

338

194

743

108

Explanation / Answer

#include #include //To Get System Time#include //To Use RAND Function to generate random number#include //to use colorsusing namespace std;void InitialArray();void InsertionSort();void BubbleSort();void selectionSort();int ArraySize;int* Array;void InitialArray(int NextSize){ArraySize=NextSize;int *Arrayx = new int[NextSize]; //Using this Way To provide nonconstant variable for array sizeArray=Arrayx; //reference this local variable to use it as Global srand(5);for(int Fill=0 ; Fill
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote