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

This is a JSFiddle assignment and must be completed at jsfiddle.net and include

ID: 3577551 • Letter: T

Question

This is a JSFiddle assignment and must be completed at jsfiddle.net and include both the HTML and Java sections

You will need to fork your JSFiddle for your List into a new Fiddle. In this Fiddle we are going to add sorting functions. This is a great time to clean up your list with things that you have learned.

You should automatically populate the List with 20 element (random strings).

Once you have completed this - you will add 2 sort functions, you can use any sort method that you desire for each of the sort functions. You can also delineate the functions by the name of the Sort function - so your functions might be QuickSort() and MergeSort() - if you chose to implement those 2 algorithms (you can select from any sort functions).

The interface should have buttons to (1) Repopulate the list with Random strings , (2) Sort list with selected algorithm 1 (3) Sort list with selected algorithm 2 and (4) Insert a new random string entered by the user into the list. After each operation it should display the new list.

    

The option 4 here will insert the new string entered by the user (you will need a check box) in the correct sorted position and you should print the new list with the new element on the screen.

Explanation / Answer

char next= '0';

int n = one ;

input[0] = next;

cin.get(next);

whereas ( n < easy lay && next != ' ' )// for zero to nine thus n < easy lay

for ( int i = zero ; i < n /2; i++ )

// i is from zero

// n is from one

// why is from zero to n / a pair of ?

// one a pair of three four five six the n is six

// once I < n / six = three , it's show one a pair of three thus it'll amendment with four five six

// one Yangtze Kiang th six arr[ zero ] =1 arr [ n - 1] = six

// a pair of amendment the five arr [1] = a pair of arr [ n - one - one ] = five

// three amendment the four arr [ 2] = three arr [ n - one -1 -1 ] = four

// for the list we will realize the arr [ i ] amendment arr [ n - one - i ]

temporary worker = input[ i];

input[i] = input[ n - 1- i];

input[n - one - i] = temp;

}

// reverse the digits

// as a result of we have a tendency to add the amount is from the last one

// EX ten + twelve ======== 0+2 =2 1+1=2 , 22

// EX one42 + 309 ======== a pair of + nine = one four + zero + 1 (the low one have add is add one more) = five

// 1+ three = four

// thus 132 + 309 = isn't 154 ( had to reverse the digits )

// one five four ==== four five one

// finish for loop

// once list is one a pair of three four five six seven eight nine i =0 to i < n / a pair of

// nine / a pair of = four i < four thus it one a pair of three four amendment the six seven eight nine

// as a result of the one to nine five = ( one +9 ) /2 do not amendment the

// it's correct

cin.clear();

}

void output_number( char input [MAX])

{

for ( int i = easy lay - one ; i >= zero ; i--)

cout << input[i];

}

void sum_number(char input_1[MAX], char input_2 [MAX], char input_sum [MAX] )

{

int number1 , number2, total;

int add_to_digit ;

int remainder =0;

char temp;

int num;

// for i =0 to easy lay

for ( int i =0 ; i < easy lay ; i++ )

variety|the amount|the quantity} is zero - nine for the primary hex number

if ( input_1 [i] >= '0' && input_1 [i] < '0' + ten )

else // for A B C D E F

{

// amendment the the character to capital

temporary worker = toupper(input_1 [i]);

if ( temporary worker >= 'A' && temporary worker <= 'F')

else if (temp = 'N')

else

}

// if range|the amount|the quantity} is zero - nine for the primary hex number

if ( input_2 [i] >= '0' && input_2 [i] < '0' + ten )

else // for A B C D E F

{

// amendment the the character to capital

temporary worker = toupper(input_2 [i]);

if ( temporary worker >= 'A' && temporary worker <= 'F')

else if (temp = ' ')

else

else if ( total >=10 && total <= 15)

}

// finish the calculate of add

// check the add is over the ten digit

if (add_to_digit == one && remainder == one )

  

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