Your second task is to implement the Insertion Sort algorithm by making a function with the following prototype; void insertion_sort(int * ptr_array, int size, int order); This function takes as input a pointer to the start of the array, and the array size and sorts it inplace. The last input to the function is the sorting order (0 for ascending and 1 for descending).
What are the array contents X after the execution of the following program segment:
int x [ ] = {10, 2, 3, 4, 1 }, i ;
x[ 4 ] = 2 * x[ 3 ] ;
i = 3 ;
while ( i >= 2 )
{
if ( x[ i ] % 2 == 0 )
x[ i ] = x[ i - 1 ] + 2 ;
else
x[ i ] = 11 ;
i -- ;
}
Unite Family
Sample Input
{'surname' : 'Jones', 'city': 'Los Angeles'}
{'dish': 'puddings'}
{'pet': 'Peter'}
Sample Output
Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"
"use strict";
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
const father = JSON.parse(readLine().replace(/'/g, '"'));
const mother = JSON.parse(readLine().replace(/'/g, '"'));
const child = JSON.parse(readLine().replace(/'/g, '"'));
/* Write your code here */
/* Please do not modify anything below this line */
console.log(`Mr and Mrs ${family.surname} went to a picnic in ${family.city} with a boy and a pet ${family.pet}. Mrs ${family.surname} made a special dish "${family.dish}"`);
}
1.Write an Employee class that keeps data attributes for the following pieces of information:
a. Employee name
b. Employee number Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:
c. Shift number (an integer, such as1 for morning shift, 2 for evening shift)
d. Hourly pay rate Write the appropriate accessor and mutator methods for each class
1.Write an Employee class that keeps data attributes for the following pieces of information:
a. Employee name
b. Employee number Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:
c. Shift number (an integer, such as1 for morning shift, 2 for evening shift)
d. Hourly pay rate Write the appropriate accessor and mutator methods for each class
https://www.chegg.com/homework-help/questions-and-answers/question-2-marks-20-organisation-work-asked-create-interactive-application-assist-allocati-q74111994
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.
Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.
a b c d e f g h i j k l m n o p q r s t u v w x y z
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
Input
Explanation
For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".
python learning16-25-20-8-15-14 12-5-1-18-14-9-14-7Make Employee an abstract class. Declare salary() and display() as pure virtual functions in it. Derive salaried employee (monthly), hourly employee (per hour basis), and commissioned employee (bonus on completing each target) from base class Employee. The display() function should show employee no, employee name, and salary of all employees.
Implement MeraSet3 class similar to the last assignment. Make it unlimited, ie. use new and delete to extend or contract the memory size of the underlying array as required. Initially make it size 1, and grow it to two when you have the first insert, and so on. Similarly, reduce the size by 1 when a member element is removed.