Question: NOTE : IS STUDYING C++ PROGRAMMING 2 Prompt: Assignment: Array Duplicates For this lab you will work on the partially-implemented project array_duplicates. The project already

NOTE: IS STUDYING C++ PROGRAMMING 2

Prompt:

NOTE: IS STUDYING C++ PROGRAMMING 2 Prompt: Assignment: Array Duplicates For this

lab you will work on the partially-implemented project array_duplicates. The project already

Assignment: Array Duplicates For this lab you will work on the partially-implemented project array_duplicates. The project already contains the necessary cases to test your functions. Your job is to implement the following function definitions (your code should be written all in one file, the Functions.h file): deleteDuplicates) O Parameters: an array and the number of elements in the array. o Deletes all duplicates in the array. o You will need to shift the rest of the elements after deleting an element. printArray() o Prints the array elements on one line. O Parameters: an array and the number of elements in the array. NOTE: You are writing function definitions-do you know the difference between a definition and a declaration of a function? If not, check the Review 1 slides. Make sure you: Do NOT modify the code already provided Add a name header with your name, date, etc. Pass by reference when needed and you add the const modifier to the parameters ONLY when necessary. Do NOT use a return statement without returning anything! return; Do NOT use the break and continue statements (there are no switch statements to use break). Do NOT use global variables ever. Keep in mind the following: Divide your code in meaningful blocks for readability Name your variables using descriptive names Use all appropriate conventions for naming Do not leave unnecessary spaces or lines in your code Expected Output: Array: 1 After deleting duplicates: 1 Array: 11 After deleting duplicates: 1 Array: 112 After deleting duplicates: 1 2 Array: 1 21 After deleting duplicates: 1 2 Array: 1 2 2 After deleting duplicates: 1 2 Array: 1 1 1 2 1 After deleting duplicates: 1 2 Array: 1 2 2 1 2 2 2 After deleting duplicates: 1 2 Array: 2 3 6 3 2 4 6 6 3 2 After deleting duplicates: 2 3 6 4 Press any key to continue ... Assignment: Array Duplicates For this lab you will work on the partially-implemented project array_duplicates. The project already contains the necessary cases to test your functions. Your job is to implement the following function definitions (your code should be written all in one file, the Functions.h file): deleteDuplicates) O Parameters: an array and the number of elements in the array. o Deletes all duplicates in the array. o You will need to shift the rest of the elements after deleting an element. printArray() o Prints the array elements on one line. O Parameters: an array and the number of elements in the array. NOTE: You are writing function definitions-do you know the difference between a definition and a declaration of a function? If not, check the Review 1 slides. Make sure you: Do NOT modify the code already provided Add a name header with your name, date, etc. Pass by reference when needed and you add the const modifier to the parameters ONLY when necessary. Do NOT use a return statement without returning anything! return; Do NOT use the break and continue statements (there are no switch statements to use break). Do NOT use global variables ever. Keep in mind the following: Divide your code in meaningful blocks for readability Name your variables using descriptive names Use all appropriate conventions for naming Do not leave unnecessary spaces or lines in your code Expected Output: Array: 1 After deleting duplicates: 1 Array: 11 After deleting duplicates: 1 Array: 112 After deleting duplicates: 1 2 Array: 1 21 After deleting duplicates: 1 2 Array: 1 2 2 After deleting duplicates: 1 2 Array: 1 1 1 2 1 After deleting duplicates: 1 2 Array: 1 2 2 1 2 2 2 After deleting duplicates: 1 2 Array: 2 3 6 3 2 4 6 6 3 2 After deleting duplicates: 2 3 6 4 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!