For this exercise you will work on the partially-implemented project Duplicate.
ID: 441117 • Letter: F
Question
For this exercise you will work on the partially-implemented project Duplicate. The project contains a main function that already has testing cases. Do NOT modify the main function. Your job is to implement the following functions (this needs to be coded all in one file, the Main.cpp file): fillArray() Fills array with random numbers from 1 to 50. deleteDuplicates() Deletes all duplicates in the array. You will need to shift the rest of the elements after deleting an element. printArray() Prints the array elements on one line. Make sure you do NOT loop through the whole length of the array, but only up to the number of elements. Make sure you: Add comments to all function declarations (see syllabus for details on how to write a comment) Pass parameters by reference and as constants when necessary For those of you who were not in CS A150 with me, you need to keep in mind the following: Do NOT use global variables ever 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.Explanation / Answer
//here you go // comment/rate and I'll unhost //the array definition arent necessary anymore, but left them in so you can compare //sideby side //main must be mod to work with vectors instead of arrays // ( o_o) https://www.dropbox.com/s/y2zidnvha3u5hh4/3FxnRandDeleteDisplayVector.txt
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.