Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

You Just got your 1st internship as C++ developer CONGRATULATIONS, your manager gives you your 1 st task to solve below.

PROBLEM SPECIFICATION

Your company wants to collect the total number of age groups within the company and calculate the average age of employees and the classification (see below table) within the company. You are required to write a program in C++ that will ask the user to enter the integer age. Determine in which group allocation each employee belong (refer to table below) and calculate the total Age sum and the company average age. The program should populate a report showing all the information. The user should enter a negative value to indicate that they are done.


Description and Age group

1.Young employees From 19 till 35

Middle Age group 36 till 49 (inclusive)

2.Elderly 50 till 65


Please note the below points:

1. Demonstrate the use of loops to solve this problem.

2. A sentinel should be utilised.


Write true or false for the following statements


1.1 The body of a loop executes at least once in a post-test loop.

1.2 Nested loop is a process of having an if statement inside another if statement.

1.3 A pseudocode includes all the declarations and all types of statements.

1.4 When the loop-continuation condition in an iteration statement never becomes false then that loop can become an infinite loop.

1.5 Continue and break statements may be embedded only within iteration statements.


Implement a Heap ADT using vector.

In the main function, declare an array of N (10 < N < 30) elements and fill it with random numbers between 1 and 100. Then fill the heap with these number and then remove all items by displaying them on-screen (heap sort demonstration)


Write a Menu Driven C++ program that creates one-dimensional array arr[] and initialize it with user of

size 15. The program should do following Tasks using Menu, The menu operations are implemented using


a) Write a function circular(),which replace every element of the array by the sum of next two

consecutive elements in a circular manner i.e. arr[0] = arr[1] + arr[2], arr[1] = arr[2] + arr[3],

... arr[n – 1] = arr[0] + arr[1].

b) Write a function Search(), takes an array and element to search in the array and returns the index

of element if the element is found. And return the negative number if not found.

c) Write a function shift_circular (), which shifts an array circularly left by two positions. Thus, if p[0]

= 15, p[1]= 30, p[2] = 28, p[3]= 19 and p[4] = 61 then after the shift p[0] = 28, p[1] = 19, p[2] = 61,

p[3] = 15 and p[4] = 30.


Write a Menu Driven C++ program that creates one-dimensional array arr[] and initialize it with user of

size 15. The program should do following Tasks using Menu, The menu operations are implemented using

a) Write a function count(), that counts the occurrences of x (a number) in arr[].

b) Write a function partition (), that take the first element of the array x and put x in a position such

that all smaller elements (smaller than x) are before x, and put all greater elements (greater than

x) after x.

c) Write a function next_XOR(),the count of elements which are equal to the XOR of the next two

elements in an array.

d) Write a function duplicates(),which calculated the frequencies of all the elements and display

them.


Write a C++ Program to Multiply Two Matrix Using Multi-dimensional Arrays. You can use int or double

2D array and takes it input from user. This program takes two matrices of order r1*c1 and r2*c2

respectively. Then, the program multiplies these two matrices (if possible) and displays it on the screen,

please take input from user.


Take a sorted array of 15 elements of type int and a value x from user, you need to find the ceiling

and floor of x. The ceiling of x is the smallest element in array greater than or equal to x, and the

floor is the greatest element smaller than or equal to x. Assume than the array is sorted in

ascending order. Write functions to find floor and ceiling of x from the given array.


Take a Boolean 2D array of 10X 10, where each row is sorted from the user, Find the row with the

maximum number of 1s.


Take an unsorted array of size 15 and type int from the user and a number n, find if there exists a

pair of elements in the array whose difference is n.


We are given two sorted array of size 15 and of type int (take input from user) (all elements are in

ascending order. We need to merge these two arrays such that the initial numbers (after complete

sorting) are in the first array and the remaining numbers are in the second array.


LATEST TUTORIALS
APPROVED BY CLIENTS